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: 
vbravomo
Contributor III
Contributor III

Sort by an expresion

Hello, 

I have a pivot table with three dimensions and two measures. The first dimension is sorted by name, but the two next ones have to be sorted by the first metric. 

I'm using the next expression in the sorting area, wich is the expression of the metric.

Sum({<[Date]={">=$(=YearStart(AddYears(Today(),-1)))"}>}Metric)

The problem is that the pivot table doesn´t sort it unless I select a dimension. I've tried adding aggr(...,second dimension) but I have the same problem. 

Please can anyone help me?

Thanks in advance

Labels (4)
5 Replies
sunny_talwar

You might need to use a calculated dimension with dual function to get the sorting correct.

vbravomo
Contributor III
Contributor III
Author

Between the second dimension and the metric? 

 

sunny_talwar

Convert second dimension into a calculated dimension is what I am suggesting

vbravomo
Contributor III
Contributor III
Author

Thnks but it doesn't work

sunny_talwar

Do you have a sample you can share?