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: 
arusanah
Creator II
Creator II

Help With QSVariable

I am using QsVariable to switch between expressions  for my SimpleKPI Object.

for Dimension I am using Following Expression .

if(Metric1=2,PlanA,Aggr(Only({<[PlanB] -= {'New*'}>} [PlanB]), [PlanB]))

But what is happening is it only picks first Dimension i.e PlanA,it doesn't go to else part... I'm not able to replicate the issue .

can anybody help

5 Replies
sunny_talwar

You mean that when Metric1 is not equal to 2 it doesn't show PlanB as dimension?

arusanah
Creator II
Creator II
Author

right

TKendrick20
Partner - Specialist
Partner - Specialist

The IF statement looks fine, you may have to use $(Metric1).

sunny_talwar

Can you try this:

If(Metric1 = 2, PlanA,

     If(Not WildMatch(PlanB, 'New*'), PlanB))

shraddha_g
Partner - Master III
Partner - Master III

you can use following,

pick( wildmatch( vVariable ,'Value1','Value2'),

Expression1,

Expression2

)

for Dimension:

pick( wildmatch( vVariable ,'Value1','Value2'),

Dimension1,

Dimension2

)

Here, vVariable is variable used in QSVariable and It has values as Value1, Value2

It will return Expression1 if vVariable = Value1, else Expression2. it will works same as expression for dimensions.

Regards,

Shraddha