Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Input File | Desired Qlikview Output | ||||
Dim1 | Amount | Dim1 | Amount | ||
A | 10 | A | 10 | ||
B | 20 | B | 20 | ||
C | 40 | C | 40 | ||
E | 60 | E | 60 | ||
F | 80 | F | 60 | F=80-20 | |
G | 90 | G | -50 | G=40-90 |
Hi i have input file like Dim 1 and Amount are fileds
now i want Subtract Two particular rows like F=F-B(-50) and G= C-G (60)
please help thanks
Use expression like:
If( Dim1='G', Sum(total {<Dim1={'C'}>}Amount)-Sum(total {<Dim1={'G'}>}Amount),
If( Dim1='F', Sum( total {<Dim1={'F'}>}Amount)-Sum(total {<Dim1={'B'}>}Amount), Sum(Amount))
)
Doing it in the script would a better solution I believe. Have a look here:
the above is straight foreword it wont help
Well, I don't really understand which one is so-simple and why that could not help. Could you let me know if a script solution would help you or you want it in the UI?
i want it in ui only
Use expression like:
If( Dim1='G', Sum(total {<Dim1={'C'}>}Amount)-Sum(total {<Dim1={'G'}>}Amount),
If( Dim1='F', Sum( total {<Dim1={'F'}>}Amount)-Sum(total {<Dim1={'B'}>}Amount), Sum(Amount))
)