Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlik Sense - Limiting a dimension stacked bar chart problem

Okay so I am trying to limit a stacked bar chart so that it shows me the top 25 first and then I click on "Others" and shows me the rest as batches of 25. However I believe there is a problem when trying to limit this. The problem is as follows:


I have measure c = c1+c2
I have 2 measures in my stacked bar chart which are c1 and c2 which performs an aggregation and shows me the value of c.
Now when I am trying to limit in batches of 25, it is sorting the bar chart with c1, that is I see the top 25 c1 and then the rest.

However, I want top 25 of C that is the aggregation of C1 & C2. How can I achieve this?

In the screenshot below, you also see that it says: "Calculated on measure CY Billed Amount" which is C1 in my example above. But I want this to show me top 25 C first.

Hope I made sense.

Qlik.PNG

1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

yes there is a work around

you can create a calculated dimension

something in the line :

aggr(if(rank(c1+c2)<=25,dimension,'Other),dimension)

View solution in original post

6 Replies
shraddha_g
Partner - Master III
Partner - Master III

Limiting dimension always work on 1st measure.

Not applicable
Author

Correct and thanks for confirming.

I understand that. What I am looking for is, will I be able to specify a measure which I have not added in the bar chart to do the limitation?

The measure C is not in the bar chart but can I limit it by measure C? Is there any workaround?

lironbaram
Partner - Master III
Partner - Master III

yes there is a work around

you can create a calculated dimension

something in the line :

aggr(if(rank(c1+c2)<=25,dimension,'Other),dimension)

Not applicable
Author

Ah! Perfect! Very close to the solution I need. Very elegant though! Loved the solution!

The only other thing is that the dimension "Other" now tops my chart in terms of sorting. It is now my number 1, obviously because it has the highest number. But how can I make this the 25th in every batch?

lironbaram
Partner - Master III
Partner - Master III

in the sorting

put your dimension as the first sorting order

and sort by expression

use this expression

aggr(if(rank(c1+c2)<=25,c1+c2,-99999),dimension)

and select descending order

Not applicable
Author

You sir are awesome!!