Discussion Board for collaboration related to QlikView App Development.
I am trying to make a Chart If Statement work using a field to inject the logic.
Here are my test data:
LOAD * INLINE [
Dimension, Logic, Target_Value
Cars, Value < Target_Value, 2
Bikes, Value > Target_Value, 2
In my chart, I have used the following test If statement:
The challenge I have is that my formula works when one of the dimensions is selected (eg Cars or Bikes):
But it does not work in the default state with no selections. It only returns the dash '-' see below:
Does anyone have a way to make this scenario work so that the logic works when no selections are made? File attached...
Thanks in advance,
Have a look at the attached file.
If(Pick(Match(Logic,$(=Concat(Chr(39)& Logic & Chr(39), ','))),$(=Concat(Logic,','))),1,0)
View solution in original post
Create a variable vTest
Use the expression $(vTest)
You will get your output.
Many thanks Tamil - that works brilliantly!
Thanks Uj - I like that idea. However, I want to keep the Logic field within the table for now. See Tamil's solution below.