Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need a If-else formula on Sum Condition 1

Status
Not open for further replies.

hormaz

MIS
Oct 22, 2011
24
US
hi,
I have a report in which i have to show the sum balances of greater than 5 Lacs , I want to apply an if-else query on Sum
How to create a formula of If-else on sum condition. I have given my query formula please make the requirement changes.

=if(sum of LCY Balance) > 5,00,000.00 "True" else "False"

Thanks..
 
Are you planning to use suppression? Or group selection? Are the sums created per group? Assuming this is so, for group selection, you would use a formula like this (report->selection formula->GROUP):

sum({table.LCY Balance},{table.groupfield})>5000000

-LB
 
Thanks for your reply,

I just need a true or false query as i dont need to supress the records, I just want show True if the sum of LCY is above 5,00,000.00 or false,

I just want to apply if-else formula on sum condition

 
if sum({table.LCY Balance},{table.groupfield})>5000000 then true

Not sure why you are showing variable places in the number for your commas. This isn't a string is it?

-LB
 
lbass, Sorry for late reply,

The report is sorted on Group No,

so, I just want a formula where i have to just add a field next to LCY Balance to show that wheather True if balance is greater than 500000
So as per your formula, i will create a new formula where i will type:
if sum({table.LCY Balance},{table.groupno})>500000 then true else false.

Kindly tell the above formula is correct or not.

Really Thank you so much.
 
Did you try the formula? If the results were not what you expected, how were they different?

-LB
 
Hi,

The formula is showing correct details, Now i just want to supress the false records, that means only LCY > 500000 records should be appear.

Thanks.
 
Then use a section suppression formula like this:

sum({table.LCY Balance},{table.groupfield})<=500000

OR, use a group selection formula like this:

sum({table.LCY Balance},{table.groupno})>500000

-LB
 
Hi,

1 doubt should i remove my previous formula and then apply a group selection formula.
 
Hi,

One more doubt in my report i have to report negatvie values also which should be greater than 500000. That means my report should show the output > 500000 (negative and positive values)

Thanks.
 
Use a group selection formula like this with no section suppression:

abs(sum({table.LCY Balance},{table.groupno}))>500000

-LB
 
If i want to add a formula in section supression then how it would be.
 
Just the opposite:

abs(sum({table.LCY Balance},{table.groupno}))<=500000


-LB
 
Your formula is working perfectly, but one help oly the sum of LCY line is getting suppressing not the whole record

Eg;

BOM 2300000
BLR 2200000
LCY 1000000

So only LCY is getting suppress not the whole record.
 
That was why I suggested you use group selection. But since you are using section suppression, add the exact same suppression formula to the detail section in the section expert.

-LB
 
Thanks mate. Group selection is perfect. Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top