To explain it simple
I have 2 column a and b.
Third column C is a formula with condition (if b>a, than b – a, else 0).
If there are two row. In first row a = 50 and b = 100, c will show as 50.
In second row a=100 and b= 20, c will show 0 as (b<a).
Now if I am applying sumct on C, it is displaying 0.
Sumct is getting applied on subtotal of a and b. i.e. a= 150 and b=120, hence it is showing 0.
But I want it to show 50, as I have to do further calculation on it.
How can this be achieved.
Kindly Help.
Hi Mariadas Rajamani,
First of of all, it seems to me that using the Function Sumct might not be the best solution for the logic you want to implement, I got this conclusion after taking a look at the documentation for SUMCT, in the link below you can see an example of how this Function works.
https://help.sap.com/saphelp_nw70/helpdata/en/03/17f13a2f160f28e10000000a114084/content.htm
Now, I would recommend to take a look at the link below to understand how an "IF-THEN-ELSE" expression can be built in Query Analyzer.
https://help.sap.com/saphelp_nw73/helpdata/en/23/17f13a2f160f28e10000000a114084/content.htm
Finally, you might also need to take into account the "Formula Collision" behavior in your query.
https://help.sap.com/saphelp_nw70/helpdata/EN/d2/02223c5f00612be10000000a11402f/content.htm
Good luck,
Francisco Milán.
Add comment