Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a table like this (simplified):
Category | System Type | QTY | Calculation |
C1 | TypeA1 | 9000 | 9000 |
C1 | TypeA2 | 25000 | <25000 - 9000> |
C1 | TypeB | 1200 | 1200 |
For certain System Types I need to subtract the quantity of a different system type to get the correct Calculation value.
The measure I tried is:
SUM({$<CATEGORY={'C1'}, SYSTEM_TYPE={'TypeA2'}>} QTY) - SUM({$<CATEGORY={'C1'}, SYSTEM_TYPE={'TypeA1'}>} QTY)
but this returns 25000 for type A2 instead of 25000-9000.
How can I edit the measure so it shows the correct value?
Hi ,
Your expression will give correct result on KPI chart . You should handle this subtraction at the backend in script using peek or if statements or variable.
Seems like you should be using Above() for this.
QTY - if(System = 'A1',Above(QTY),0)
Working in whatever conditions you need.
i have tried the above function ,but still in straight table ,it shows different output.
I'm not sure what that table is meant to show, exactly, but the Above() formula in the rightmost column doesn't make sense. It seems to only apply Above() to the ID in the first row, and for the first row, there is no Above() because it's, well, first.