Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Help please,
I have a chart where I have 3 alternative measures for a user to pick from (named Profit%, Profit and Volume) Depending on which measure the user selects I want a different reference line to show on that chart. I've created the 3 reference lines, one for each alternate measure, and I wanted to put a show condition in so the one corresponding to the correct measure would show. I thought the GetObjectMeasure() command would work, but I've tried all of the below variations in the show condition, for the reference line I want to see if the measure Profit% is selected, but none of these work.
=IF(GETOBJECTMEASURE()='Profit%',1,0)
=IF(GETOBJECTMEASURE()='Profit%',-1,0)
=IF(GETOBJECTMEASURE()='Profit%',TRUE(),FALSE())
=GETOBJECTMEASURE()='Profit%'
=IF(GETOBJECTMEASURE()='Profit%',1)
=IF(GETOBJECTMEASURE()='Profit%',-1)
=IF(GETOBJECTMEASURE()='Profit%',TRUE())
=IF(GETOBJECTMEASURE()='Profit%','TRUE','FALSE')
All above with GetObjectMeasure(0) too
the GetObjectMeasure() command returns the Measure name if I apply it to a dimension title but doesn't work if I use it for the title in the reference line, is this a bug or am I doing something wrong?
GETOBJECTMEASURE() function cannot be used in reference lines as indicated in the following link:
GetObjectMeasure - chart function | Qlik Sense on Windows Help
Actually, I have checked and I could not find any way to link the reference lines with the alternate measures. Hence, you should try another way to do it.
For example, you can create 3 charts each with its measure and its reference line and set them inside a tab container. In this way, the users only need to change from one tab to anther inside the container to change both measures and reference lines.
Also, you can use buttons and variables to change from one measure to other. In this way, when the button is clicked to change the measure, the reference line can use the same variable to change too.
If you need more information on how to use these methods, please, let me know.
Kind Regards
Daniel