Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Posibility of using a measure label in other measure expression

Hi everyone,

Basically my question is the same as you can find here: Is it possible to re-use a measure in the expre... | Qlik Community

But as this post is closed I can not ask there.

Any one knows if this feature is implemented on current version of Qlik Sense?

Thanks a lot.

5 Replies
OmarBenSalem

Could u explain this with ur own case?

what measure do u have and what do u want to change/add?

and WHERE do u want to do this change? in which chart? or in the script?

Thanks

mdmukramali
Specialist III
Specialist III

Hi,

you can do something like :

Create a variable with expression .

Like :

vSales

value:

Sum(Sales)

and you can use that $(vSales) into multiple places it will work.

if you want to use Measure A and Measure B in the Same Chart you can try to Use:

Column(1) in Measure B so it will read the data Values of the column(1).

even I tried Expression Measure A label in Measure B it's showing an error in syntax but showing the correct value.

MeasureA and MeasureB.png

Anonymous
Not applicable
Author

What I want to achieve is referencing a measure (by measure label I guess) in the color by expresion so the color changes with the measure value.

My problem is that the measure expression is too large, so I rather prefer to type just the measure name (label) and not the whole measure expression.

Anonymous
Not applicable
Author

Thanks for your answer but this is something I knew and I dont like it because its not effcient for me creating a variable for each chart with this needs.

Thas why a asked about getting this done just in the context of the chart.

PatrickAlex
Contributor II
Contributor II

In "Qlik Sense Cookbook" (Labbe Et Al), there is a section called:

"Using measure names in object expressions"

Qlik Sense provides the Master items to create dimensions and measures to be reused in the Visualization objects.

Each measure has a fixed label and, in some cases, we can use the measure name instead of the base expression to create or for coloring a chart by expression.

I had to use it in order to set the max values for two axis range parameter in a combined chart with two expressions, one for each Y axis, but It did not work for my use case. Maybe it works for yours.

https://books.google.com.br/books?id=6kZsDwAAQBAJ&pg=PA298&lpg=PA298&dq=qlik+sense+referencing+measu...

I'm glad if it help you some way.