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

Problem in using set analysis

Hi,

     I have to show the top 5 Customers based on the Sales.I wanted to show them using a Pie Chart.

    Now this should be insensitive to any selections being made in the Listboxes(i.e..Fields)

    So I put the following Expression : If(Rank(Sum({1} Sales))<=5,Sum({1} Sales)) and Dimension:Customer

 

    This Expression populated the top 5 correctly.But what I need is:

 

    I have a Year Field and a Quarter field and the top 5 should change based on only the Year and the Quarter Selection.

    Please let me know the way forward.

Regards

Navin.G

2 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

    Do you mean to say that the expression should be effected only for Year and Quarter filters..?

 

    If yes then you need to pass all other filters in set analysis. Something like this.

    Say you have 5 filers. i.e Field1, Field2 , Field3, Year and Quarter.

    If(Rank(Sum({<Field1 =, Field2 =, Field3 = >} Sales))<=5,Sum({Field1 =, Field2 =, Field3 =} Sales))

Regards,

Kaushik Solanki  

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Hi Kaushik,

                 Your right.I was able to now do it.I have another question

                  I have displayed the Top 5 in this way and now I need to display the Bottom 5 in the Same way.

                  Can you suggest any method to do so?

Regards

Navin.G