Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have following fields in my data table
Note Amount
100 100
101 500
102 300
103 400
200 800
I want to create following variable in my load script
if Note=100 then sum amount as X
if note =101 then sum amount as Y
if Note =200 then sum amount as Z
I have written the load statement like this but it does noe work. Pls help me with correct script
if(NOTE='100',sum(AMOUNT))as X
if you want to create in load script;
orginal:
Load note,
Amount
from xyz;
X:
Load note as XNote,
sum(Amount) as XAmt
reisdent orginal where note=100 group by note;
Y:
Load note as YNote,
sum(Amount) as YAmt
reisdent orginal where note=101 group by note;
let vX=Peek('XAmt',0,'X');
let vY=Peek('YAmt',0,'Y');
I am not sure with the Requirement but it seems you can simple create a Table and with dimension Note and expression as Sum(Amount) you will get desired output.
and same as backend
LOAD BAL_ACCT_CODE,
NOTE,
CLA_CODE,
Sum(AMOUNT) as Amount,
BCOD
FROM
[..\QVD\FACT_Table\Trial_Balance.qvd]
(qvd) Group by BAL_ACCT_CODE,NOTE...all Dimensions
WHERE YEAR='2013'
Else upload a Sample Application and desired output you need
cheers same thought .....after finishing the qlikpahadi07 statements .....in chart don't take any dimension , just write the following expression :
sum({<Note={101}>}Amount)