Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filter condition in calculated dimension

I have a dimension 'Country Name'. I want to find 'Top 10' countries based on Revenue. So, in calculated dimension, I used:

if(aggr(rank(sum(Revenue)),[Country Name])<=10,[Country Name])

Problem statement:

My new requirement is, I don't want to consider some countries while I find top 10 countries. Let us say, I want to exclude COUNTRY_1 in calculated dimension.

I used :

if(aggr(rank(sum(Population)),

if(([Country Name])<>'COUNTRY_1',[Country Name])

)<=10,[Country Name])

But this is not working. Can you please help?

1 Solution

Accepted Solutions
PrashantSangle

or you can try below expression also

if(aggr(rank(sum({<[Country Name]-={"Country_1"}>}Revenue)),[Country Name])<=10,[Country Name])


Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

3 Replies
PrashantSangle

hi,

try like

if(not wildmatch([Country Name],'Country_1') and aggr(rank(sum(Revenue)),[Country Name])<=10,[Country Name])


Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
PrashantSangle

or you can try below expression also

if(aggr(rank(sum({<[Country Name]-={"Country_1"}>}Revenue)),[Country Name])<=10,[Country Name])


Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

That was right under my nose...and I missed it.

Thank you!