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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Optimize a calculated dimension

Hello, I have a dimension containing a if but the response times are very long because volumes are important. Do you have solutions to optimize?
Thank you



Aggr(If(Rank(Sum([Ca Produit HT])) < 2, [Super Famille]), [Code Client],[Super Famille])

1 Solution

Accepted Solutions
sunny_talwar

May be this?

Count(DISTINCT Aggr(If(Rank(Sum(turnover)) < 2, customer_code), customer_code, family))

Capture.PNG

View solution in original post

7 Replies
vishsaggi
Champion III
Champion III

I have not tried but just check if this works?

= Aggr(Only({< [Super Famille] = {"= Rank(Sum([Ca Produit HT])) < 2 " } [Super Famille]), [Code Client],[Super Famille])

sunny_talwar

May be don't use a calculated dimension, but use a set analysis in your expression.

Anonymous
Not applicable
Author

thanks

I tried to change by an expression like that but I have some bizarre cases in yellow.The function does not match with rank


if ( aggr(Max(total(turnover)),customer_code)>0,1,0)

Do you know why?


bizarre.JPG

thanks for your help

Anonymous
Not applicable
Author

Application example


thanks

passionate
Specialist
Specialist

If you want to show top 2 values why don't you try dimension limit.

sunny_talwar

May be this?

Count(DISTINCT Aggr(If(Rank(Sum(turnover)) < 2, customer_code), customer_code, family))

Capture.PNG

Anonymous
Not applicable
Author

wonderful

thanks you very much for your help