I post two images of a example with two dimension and two measures (alternatives).
The first measure is sum(Affected Units) and the second one is sum(Total cost)
The first image show the dimensions and measures and the second one shows the order.
I dont know how to define the expresion to order the dimension. I have now defined it as sum(Affected Units) but when I change the visualization in order to show the Total cost measure it continues ordering by Affected Units (logical and correct behavior).
I have found in the community the function getobjectmeasure:
=if(getobjectmeasure()='Affected units', sum([Affected units]),
if(getobjectmeasure()='Total cost', Sum([Total cost])))
but my qliksense instalation does not recognize this function.
I hope I have explained the problem well.
What I'd propose is:
create an inline table:
load * inline [
Now in your presentation, put the new created field as a filter : measure:
in your bar chart,
as a measure:
in the sorting tab of your chart, make sure your measure is at the top .
now, when you select from the filter, Expression1 you'll have your chart with yourfirstExpression and well sorted, same thing when you select the second Expression.
Hope this helps
see the attached app
Mesures alternatives.qvf 240.0 K