Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
zhaokuifangmm
Contributor
Contributor

Reference to self Error in Master Measures

Hi all, 

I have a master measure with the following formula:

If(Present >= 20, 'Good', If(Present >= 10, 'Medium', 'Bad'))

This formula used to work fine. However, when I checked this report I found that this field does not work anymore.

In the edit mode I got the following error message:

Reference to self

 

As I understood I cannot use the same reference in the else clause. Does anybody knows why it used to work but not now? Is there any other way to write this formula? Many thanks!

3 Replies
sfbi
Creator
Creator

I'm getting the same here in a two condition if measure... never saw this kind of error.


harm_dataspark
Partner - Contributor III
Partner - Contributor III

I'm experiencing the same issue. It looks like you cannot use the same master measure more than once in an expression. 

sfbi
Creator
Creator

@harm_dataspark yes... in my case I was using if(MasterMeasure1 > 0 and MasterMeasure1 < 2, x, y)...

I solved writing down the expression it self inside the if statement.