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: 
cbaqir
Specialist II
Specialist II

IF(GetSelectedCount...) in a Text Box

I have a Text object that shows the Operating % (vOpExPercent) ) vs the Target (OP_TGT) based on the associated field called AU_IT_TOWER.


This expression works perfectly for each individual tower:

$(vOpExPercent)   & '% vs ' & OP_TGT

The problem I have is that I need to show a target if either all 7 Towers are selected or if none of the Towers are selected. Each year also has a different target.

I tried to accomplish this using the following expression but it doesn't work:

$(vOpExPercent)   & '% vs ' & if(GetSelectedCount(AU_IT_TOWER=7) or GetSelectedCount(AU_IT_TOWER=0) and (FISCAL_YEAR='FY15'),'xx%', (OP_TGT))

Please Help! I'm stuck.

TIA,

Cassandra


1 Solution

Accepted Solutions
jduenyas
Specialist
Specialist

Seems to me that your comparison is wrong

if(GetSelectedCount(AU_IT_TOWER) = 7 or GetSelectedCount(AU_IT_TOWER) = 0 And ....

View solution in original post

3 Replies
jduenyas
Specialist
Specialist

Seems to me that your comparison is wrong

if(GetSelectedCount(AU_IT_TOWER) = 7 or GetSelectedCount(AU_IT_TOWER) = 0 And ....

cbaqir
Specialist II
Specialist II
Author

Duh. Thanks Josh!

Anonymous
Not applicable

Hi Cassandra

Your =7 needs to be outside the bracket GetSelectedCount(AU_IT_TOWER)=7