Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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?

Thanks in advanced.

1 Solution

Accepted Solutions
OmarBenSalem

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

View solution in original post

7 Replies
pradosh_thakur
Master II
Master II

Can you be more specific with the examples?

regards

Pradosh

Learning never stops.
Anonymous
Not applicable
Author

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.

pradosh_thakur
Master II
Master II

please post a sample app to help you out better and faster

regards

Pradosh

Learning never stops.
Anonymous
Not applicable
Author

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.Captura1.JPGCaptura2.JPG

OmarBenSalem

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

pradosh_thakur
Master II
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

Pradosh

Learning never stops.
Anonymous
Not applicable
Author

thanks Omar