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

Nested aggregation

I am new to Qlik Sense. Trying to figure out nested aggregations . 

I need to create a table with two columns : Order Status , Order Count

I have an expression - if ( $(var_name) >0,1,0) . I need to sum all 1's .

I am trying to do sum(if ( $(var_name) >0,1,0) ) . It says nested aggregation not allowed . var_name is a variable expression - sum({<Datetype={'OrderDT'}>}Order_Count)

How should I resolve this?

TIA

Labels (1)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

Try to aggregate it on your desired dimension, like this.

sum(if (aggr(sum({<Datetype={'OrderDT'}>}Order_Count),Order_Status) >0,1,0))

View solution in original post

2 Replies
Vegar
MVP
MVP

Try to aggregate it on your desired dimension, like this.

sum(if (aggr(sum({<Datetype={'OrderDT'}>}Order_Count),Order_Status) >0,1,0))

PrashantRupani
Creator
Creator
Author

Thanks for your reply. Sorry I was out of town so replying to your message so late

Your solution helps. Thanks.