Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
luismadriz
Valued Contributor

Sorting inner segments of Stacked Bar

Hi,

Can anyone please help me to sort the inner segments of each the stacked bar from the one with the most for each Age Group to the one with the least?

For example, for the Age Group 00-04, the blue segment should be at the bottom, then the purple, etc.

Maybe this is not possible and it's designed like that because all segments should have the same order?... I mean from the usability of the visualisation point of view...

Untitled.png

Regards

Luis

1 Solution

Accepted Solutions
luismadriz
Valued Contributor

Re: Sorting inner segments of Stacked Bar

Found the solution,

I changed the way the second dimension (inside each bar) was created...

instead of just using :

PPA

I'm using:

=DUAL(PPA,AGGR(Sum(Value),PPA,age_cohort_5yrs_ch))

Then in the Sorting area, selected Numeric Descending. Now each inner segment of each bar is sorted as required

Untitled.png

I hope this helps someone else

Cheers,

Luis

2 Replies
luismadriz
Valued Contributor

Re: Sorting inner segments of Stacked Bar

I guess this may not be possible in Qlik Sense... Is this possible in Qlik View?

Please let me know,

Thanks,

Luis

luismadriz
Valued Contributor

Re: Sorting inner segments of Stacked Bar

Found the solution,

I changed the way the second dimension (inside each bar) was created...

instead of just using :

PPA

I'm using:

=DUAL(PPA,AGGR(Sum(Value),PPA,age_cohort_5yrs_ch))

Then in the Sorting area, selected Numeric Descending. Now each inner segment of each bar is sorted as required

Untitled.png

I hope this helps someone else

Cheers,

Luis