Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
We are aware of an issue with the Product Downloads page and looking into it.
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!

Labels (1)
1 Reply
Jason_Michaelides
Partner - Master II
Partner - Master II

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

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

Hope this helps,

Jason