Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jduluc12
Creator
Creator

Total aggr question

Hi,

My data set looks like this

CustAddrAmount
Cust1addr1100
Cust1200
Cust2addr2300
Cust2400

My pivot table should like this

CustAddrAmt with addrAmt without addr
Cust1addr1100200
Cust2addr2300400

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

8 Replies
shiveshsingh
Master
Master

You can try 2 expressions for output

if(len(Addr)=0,sum(Amount))

if(len(Addr)<>0,sum(Amount))

isingh30
Specialist
Specialist

Shivesh...we have to add zero in the data set first? As of now, it's blank.

Thanks.

isingh30
Specialist
Specialist

Capture.PNG

sum({<Addr = {'addr1','addr2'}>}Amount)

sum({<Amount = {200,400}>}Amount)

I got this.

Thanks

passionate
Specialist
Specialist

PFA, Solution

isingh30
Specialist
Specialist

Can you share your code & output?

Thanks.

shiveshsingh
Master
Master

Add zero for Addr? you mean this or something else?

passionate
Specialist
Specialist

output.PNG

LOAD Cust,

     Addr,

     len(Addr) as length,

     Amount

FROM

[https://community.qlik.com/thread/302015]

(html, codepage is 1252, embedded labels, table is @1);

isingh30
Specialist
Specialist

Please check the question again. Your answer is not complete.

Thanks.