Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a query in qlikview , i have attached a image file where in i have 2 columns flag and amount, i need to subtract Gross-RI in qlikview in table , how to use that.
Sum({<Flag={'Gros'}>} Amount) - Sum({<Flag={'RI'}>} Amount)
-Rob
maybe this expression
if(Dimensionality()=0, sum({$ <Flag*={Gross}>} Amount) - sum({$ <Flag*={RI}>} Amount), sum(Amount))
S:
load *, rowno() as id inline [
Flag, Amount
Gross,34
Gross,21
Gross,21
RI,12
RI,34
RI,23
];
Link:
LOAD
id,
Flag as NewFlag,
1 as PM
Resident S;
Concatenate(Link) LOAD
id,
'Net' as NewFlag,
if(Flag = 'Gross', 1, -1) as PM
Resident S;
Dimension NewFlag
Expression sum(Amount * PM)
Thanks