Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
LuisGramillo
Partner - Contributor II
Partner - Contributor II

Changing Dinamically Order of Column

Hi everyone,

I'm working on a Qlik Sense table with three main elements: a field named CLIENT_ID, a measure which is SUM(AMOUNT) and a variable switch that controls if the user wants to see "the clients with lower amount" or "the clients with highest amount".

For the variable, I have two columns of CLIENT_ID, one having limit + last + 20 rows by the measure value, and the another having limit + first + 20 rows by the measure value. This is because i cannot change dynamically between "first" and "last" limit.

The problem is that in the version of Qlik that I'm using, there is not a "order by expression" feature in the sort panel. This causes that even changing the limit between "first" or "last", the sort order of the measures is static.

I shared examples of the problem I have, Is there an alternative to change the limit option and measure order dynamically?

I want to have
- limit = first
with measure order = descending 
- limit = last
with measure order = ascending

Labels (2)
1 Reply
rubenmarin
MVP
MVP

Hi, there is no order by expression? I thought that was there since the beginning.

I suppose there is no chance to upgrade the version of sense?

A possible workaround could be using a dynamic dimension using Dual, like:

Aggr(Dual(CLIENT_ID, $(vMeasureName)), and vMeasureName would be a variable with "SUM(AMOUNT)" or "-SUM(AMOUNT)".

But this would change the dimension to number with a text representation, so it would show right aligned.

Maybe it's better to add a numeric first column using Rank(), like: =Aggr(Rank($(vMeasureName),DATE),DATE)