# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for
Did you mean:
Highlighted
Contributor III

## Qliksense. Get Actual Measure

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?

1 Solution

Accepted Solutions
Highlighted
Partner

What I'd propose is:

create an inline table:

measures:

measure, measureID

Expression1, 1

Expression2, 2

];

Now in your presentation, put the new created field as a filter : measure:

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

7 Replies
Highlighted
Master II

Can you be more specific with the examples?

regards

Learning never stops.
Highlighted
Contributor III

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.

Highlighted
Master II

regards

Learning never stops.
Highlighted
Contributor III

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.

Highlighted
Partner

What I'd propose is:

create an inline table:

measures:

measure, measureID

Expression1, 1

Expression2, 2

];

Now in your presentation, put the new created field as a filter : measure:

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

Highlighted
Master II

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