Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
My data set looks like this
Cust | Addr | Amount |
---|---|---|
Cust1 | addr1 | 100 |
Cust1 | 200 | |
Cust2 | addr2 | 300 |
Cust2 | 400 |
My pivot table should like this
Cust | Addr | Amt with addr | Amt without addr |
---|---|---|---|
Cust1 | addr1 | 100 | 200 |
Cust2 | addr2 | 300 | 400 |
Is it possible without changing the data set?
I tried using TOTAL to ignore Addr
like
sum(Total<Addr>Amount) for 3rd column but it brings 0 value.
Jean
You can try 2 expressions for output
if(len(Addr)=0,sum(Amount))
if(len(Addr)<>0,sum(Amount))
Shivesh...we have to add zero in the data set first? As of now, it's blank.
Thanks.
sum({<Addr = {'addr1','addr2'}>}Amount)
sum({<Amount = {200,400}>}Amount)
I got this.
Thanks
PFA, Solution
Can you share your code & output?
Thanks.
Add zero for Addr? you mean this or something else?
LOAD Cust,
Addr,
len(Addr) as length,
Amount
FROM
[https://community.qlik.com/thread/302015]
(html, codepage is 1252, embedded labels, table is @1);
Please check the question again. Your answer is not complete.
Thanks.