Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

gal_polak
New Contributor III

Pivot table sort dimension by expression of the measure

Hi, 

I have a pivot table that present the top 3 departments in each week by their score.

all i want is that the results will be sorted, so the department with highest score in each week will be first, then second and third

 

Don't know if it is relevant by my measure set analysis is:

sum({$<$(=SetAnalysisPopulation), DefaultScore={'*'}>}[Factored Score])

 

2019-02-06_17-05-14.png

 

Labels (1)
1 Solution

Accepted Solutions
Highlighted
MVP & Luminary
MVP & Luminary

Re: Pivot table sort dimension by expression of the measure

Oh yeah, forgot. The second dimension is independent of the first one. So it's not a hierarchy. ADR will have a different value for 12/31/2018 then for 01/07/2019. And the problem is that it's not possible to sort a dimension per value of another dimension. You'd have to create a dimension with unique values. For example a combination of the date and the org.level.

talk is cheap, supply exceeds demand
4 Replies
MVP & Luminary
MVP & Luminary

Re: Pivot table sort dimension by expression of the measure

Go to the Sorting section of the properties of the pivot table. Expand the Org. Level 2 dimension and change the Sorting setting from Auto to Custom. Then use the same expression as in your measure as sorting expression for this dimension. Finally change the sorting order from Ascending to Descending.


talk is cheap, supply exceeds demand
gal_polak
New Contributor III

Re: Pivot table sort dimension by expression of the measure

Tried that,
but it seems that only the first and the last place changes...for example:
in 12/31/2018:
the Sales & Marketing with 8 points stay in the middle Smiley Sad

you can see the wired behavior in the attached video 

Highlighted
MVP & Luminary
MVP & Luminary

Re: Pivot table sort dimension by expression of the measure

Oh yeah, forgot. The second dimension is independent of the first one. So it's not a hierarchy. ADR will have a different value for 12/31/2018 then for 01/07/2019. And the problem is that it's not possible to sort a dimension per value of another dimension. You'd have to create a dimension with unique values. For example a combination of the date and the org.level.

talk is cheap, supply exceeds demand
gal_polak
New Contributor III

Re: Pivot table sort dimension by expression of the measure

thx, very much!