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

Top 2,Default and Others in Qliksense

Hi All,

I am facing issue with one of my scenario.

There's a Table with single dimension and single measure.

Dimension : 

=if(Name='Default',Name,
If(Aggr(Rank( sum(value)),Name)<3, Name,'Others'))

This returns Top 2 Name based on value, Default and others.

Measure :

Sum(value)

I am facing issue with the "Others" upon clicking on it for the second time.

Upon clicking on "Others" for the first time i get the below result.

abhijith28_0-1600263920829.png

But after clicking on "Others" for the second time, it doesn't return the expected output.

Below is the image returned upon selecting "Others" for the second time.

abhijith28_1-1600264031936.png

what should be the dimension expression to achieve all these scenarios?

Attached the sample app.

Please help.

Thanks & Regards,

 

 

 

Labels (1)
1 Solution

Accepted Solutions
tresesco
MVP
MVP

@abhijith28 , @sunny_talwar 

I guess I got it. The expression needs to be slightly modified. Try :

=if(Name='Default',Name,
Aggr(If(Rank(sum(value))<3, Name,'Others') ,Name))

I feel wow! 😊   This gives so much of joy ! Of course NOT for proving @sunny_talwar  wrong, 😋 but for learning a new thing in this process. I will keep my finger crossed though (if it's too early to ...).

View solution in original post

8 Replies
abhijith28
Creator II
Creator II
Author

@tresesco @sunny_talwar  @Kushal_Chawda 

Do you have any solution for this scenario. 

Please let me know if you have any🙂

tresesco
MVP
MVP

@abhijith28 , What do you expect to see upon second time selection of 'Others' ? No change? And - do you really have a purpose of selecting second time?

sunny_talwar

I don't think it is possible to do, but I will be happy to be proved wrong.

sunny_talwar

@tresesco - From what I understand, second click on Others will further break down components of Others based on these rank.

abhijith28
Creator II
Creator II
Author

@tresesco 

After clicking on "Others" for the second time, It has to further drill down and show the Name once after clicking it.

It should show the below values.

D

E

Others.

tresesco
MVP
MVP

@abhijith28 , @sunny_talwar 

I guess I got it. The expression needs to be slightly modified. Try :

=if(Name='Default',Name,
Aggr(If(Rank(sum(value))<3, Name,'Others') ,Name))

I feel wow! 😊   This gives so much of joy ! Of course NOT for proving @sunny_talwar  wrong, 😋 but for learning a new thing in this process. I will keep my finger crossed though (if it's too early to ...).

abhijith28
Creator II
Creator II
Author

Thanks @tresesco for stepping in and saving the day in this tricky scenario😊

 

sunny_talwar

Nice, but I feel good to be proved wrong 🙂