Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
thakurj
Contributor III
Contributor III

Top dimension values in tables

Hi,

Is it possible to make the top values of a certain dimension in a table based on multiple measures.

thakurj_0-1707983290725.png

 

Ordinarily, the top values of the dimension are based on the first measure. I want the user to be able to choose the measure on which the top values of the dimension should be based. 

eg. with a click of a button, the user should be able to toggle between top 10 products with highest sales and top 10 products with highest profit.

Labels (1)
1 Solution

Accepted Solutions
theoat
Partner - Creator III
Partner - Creator III

First, create a variable with an initial value of 0.

Capture d'écran 2024-02-15 104532.png

Next, add two buttons. One for your first metric (Turnover), and one for your second (Sales Volume). Clicking the first button sets the variable to 0. Clicking the second button affects the value 1.

Capture d'écran 2024-02-15 105505.png

Next, make a conditional measurement. Depending on the value of the variable, this will be one measure or the other that will be calculated.

Capture d'écran 2024-02-15 104952.png

Next, add your dimension, and add the top 10 limitation.

Capture d'écran 2024-02-15 105008.png

And voila, the graphic adapts to the button clicked.

Top 10 products by Turnover :

Capture d'écran 2024-02-15 105108.png

Top 10 products by Sales volume.

Capture d'écran 2024-02-15 105116.png

Kind regards,
Théo ATRAGIE.

View solution in original post

3 Replies
theoat
Partner - Creator III
Partner - Creator III

Hello
Yes, this is available by doing set analysis in your measurements. Inside it, you can select the top 10 of the dimension according to the chosen metric (depending on the button clicked, the value of the variable differs).
I can possibly give you a little demonstration with an easy use case.

Kind regards
Theo ATRAGIE.

thakurj
Contributor III
Contributor III
Author

@theoat Could you please show the demonstration with the use case

theoat
Partner - Creator III
Partner - Creator III

First, create a variable with an initial value of 0.

Capture d'écran 2024-02-15 104532.png

Next, add two buttons. One for your first metric (Turnover), and one for your second (Sales Volume). Clicking the first button sets the variable to 0. Clicking the second button affects the value 1.

Capture d'écran 2024-02-15 105505.png

Next, make a conditional measurement. Depending on the value of the variable, this will be one measure or the other that will be calculated.

Capture d'écran 2024-02-15 104952.png

Next, add your dimension, and add the top 10 limitation.

Capture d'écran 2024-02-15 105008.png

And voila, the graphic adapts to the button clicked.

Top 10 products by Turnover :

Capture d'écran 2024-02-15 105108.png

Top 10 products by Sales volume.

Capture d'écran 2024-02-15 105116.png

Kind regards,
Théo ATRAGIE.