Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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