Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a bar graph with 4 measures (alternatives). I need to order the dimension by the measure shown at any time.
Is there any way to know which measure are we showing?
Thanks in advanced.
What I'd propose is:
create an inline table:
measures:
load * inline [
measure, measureID
Expression1, 1
Expression2, 2
];
Now in your presentation, put the new created field as a filter : measure:
in your bar chart,
as a measure:
if(measureID=1,YourFirstExpression, YourSecondExpression)
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
Can you be more specific with the examples?
regards
Pradosh
Sorry.
I have two dimensions and four measures (alternatives).
The bar chart is stacked, so I dont know how to order the first dimension by the measure shown at any time.
Is there any way?
Thanks.
please post a sample app to help you out better and faster
regards
Pradosh
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.
Thanks in advanced.
What I'd propose is:
create an inline table:
measures:
load * inline [
measure, measureID
Expression1, 1
Expression2, 2
];
Now in your presentation, put the new created field as a filter : measure:
in your bar chart,
as a measure:
if(measureID=1,YourFirstExpression, YourSecondExpression)
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
if(GetObjectMeasure()='Affected units',sum([Affected units]),Sum([Total cost]))
working in mine and i am using sept version .
make sure you write the label name corectly
regards
Pradosh
thanks Omar