Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
vireshkolagimat
Creator III
Creator III

Show/hide the result of a formula

Hi,

I have 4 variables namely var1, var2, var3 and var4.

I am using the below formula in a text object.

If($(var1)=$(var4) and $(var2)=$(var4) and $(var3)=$(var4),'True','False')

If all the first 3 variables matches to 4th variable value then it will show true else it will show the false.

My requirement is i want to show the object if the result is false and in the same time i want to know which variable value is not matching with 4th variable value in the text object or any other object.

Regards,

Viresh

4 Replies
sunny_talwar

May be use a hide show condition like this:

Not($(var1)=$(var4) and $(var2)=$(var4) and $(var3)=$(var4))

and to view the variable that doesn't match, may be like this:

If($(var1) <> $(var4), 'vVar1 Doesn't Match') & Chr(10) &

If($(var2) <> $(var4), 'vVar2 Doesn't Match') & Chr(10) &

If($(var3) <> $(var4), 'vVar3 Doesn't Match')

vireshkolagimat
Creator III
Creator III
Author

Hi,

should i use this expression (second one) in layout or in general tab. I am getting error message saying " Error in expression:')' expected.

But the opening and closing brackets are matching.

vireshkolagimat
Creator III
Creator III
Author

Hi, i got the solution. The error was because of single quote in the word "Doesn't".

thanks

sunny_talwar

Awesome, would you be able to close this thread by marking correct and helpful responses.

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny