Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
siri_v
Contributor II
Contributor II

Calc expression not working..

Hello all,

I have a Master dimension calculation "Discount"  =If(aggr(count(orderid),orderid) >=3 ,'High,'Low')

and this works as expected. 

But now I need to get calculation for below 

% of Total for High  (count(orderid) for High)/Total count(order id) 

To accomplish this, I tried using numerator count({<Discount = {'High'}>})orderid), but this is not working. It is always displaying the total order count.

Can someone help and advise what is wrong in the above expression? Eventually I need to get the %of Total of High. 

Thanks in advance 

Labels (1)
1 Solution

Accepted Solutions
GaryGiles
Specialist
Specialist

I don't think you can use a Master Dimension as the left argument in set analysis.  I believe that the latest version of Qlik Sense allows you to use Master Items in an expressions, but I don't know if that includes in set analysis (I doubt it would).

Another way to write the numerator is:

count({<orderid={"=count(orderid)>=3"}>}orderid)

 

View solution in original post

2 Replies
GaryGiles
Specialist
Specialist

I don't think you can use a Master Dimension as the left argument in set analysis.  I believe that the latest version of Qlik Sense allows you to use Master Items in an expressions, but I don't know if that includes in set analysis (I doubt it would).

Another way to write the numerator is:

count({<orderid={"=count(orderid)>=3"}>}orderid)

 

siri_v
Contributor II
Contributor II
Author

Thanks a ton @GaryGiles !!

You are right, the issue was I could not use Master Dimension in set analysis. Thanks a lot. This worked..