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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
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
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