Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I have scenario like below, but the challenge is in my chart there is no dimension but I need to compare with each record of NS.
if we have dimension then we can use if(sum(Sale_X) - sum(Sale_Y)>0, sum(Sale_X) - sum(Sale_Y)), but without dimension I am not getting 10+30(possitve diff value). Can some have any suggestion on this scenario. Need in front end only.
NS | Sale_X | Sale_Y | Difference Amount | Expected only sum of Possitive difference ammount |
A | 10 | 20 | -10 | |
B | 40 | 30 | 10 | 10 |
C | 80 | 50 | 30 | 30 |
D | 100 | 120 | -20 |
- Priya
Or even this might work:
Sum({<NS = {"=Sum(Sale_X) - Sum(Sale_Y) > 0"}>} NS)
Update: My bad, I meant this:
=Sum({<NS = {"=Sum(Sale_X) - Sum(Sale_Y) > 0"}>} Sale_X) - Sum({<NS = {"=Sum(Sale_X) - Sum(Sale_Y) > 0"}>} Sale_Y)
Sample attached
Is this in a text box object? May be try this:
Sum(Aggr(If(Sum(Sale_X) - Sum(Sale_Y)>0, Sum(Sale_X) - Sum(Sale_Y)), NS))
Or even this might work:
Sum({<NS = {"=Sum(Sale_X) - Sum(Sale_Y) > 0"}>} NS)
Update: My bad, I meant this:
=Sum({<NS = {"=Sum(Sale_X) - Sum(Sale_Y) > 0"}>} Sale_X) - Sum({<NS = {"=Sum(Sale_X) - Sum(Sale_Y) > 0"}>} Sale_Y)
Sample attached
this is correct but creating performance issue