Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis Query

Greetings All,

Can anyone please tell me how to write

IF(Expression= Quantity,SUM(AGGR(SUM(Qty),invoiceno,orderquantity)),

     IF(Expression = Unit, SUM(AGGR(SUM(Unit),invoiceno,orderquantity))

)

in a pie chart where the dimension is the expression.

Expression is a field.

Expression

-----------------

Quantity

Unit

Quantity%

Unit%

Many Thanks!

1 Reply
Jason_Michaelides
Luminary Alumni
Luminary Alumni

Maybe try putting the IF() inside the Aggr():

AGGR(SUM(IF(Expression='Quantity',Qty,Unit)),invoiceno,orderquantity)

Hope this helps,

Jason