Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conditional expression issue

Hi All,

In my qv application I have created a straight table as the attached sample. The conditional expression that I have used for individual month field is  For example jan =SubStringCount(GetFieldSelections(Month,',',100),'Jan')>0 and GetFieldSelections(Quarter) <> 'Q2'

and GetFieldSelections(Quarter) <> 'Q3' and GetFieldSelections(Quarter) <> 'Q4'

pic1.png

But when I select any combination of quarter like Q2 and Q3, the output is like All the months are displayed with Q1 and Q4 months with 0 and Q2 , Q3 months with data. The output is correct but I don’t want Q1, Q4 to be displayed, since we are selecting only Q2 and Q3. This is for all possible Quarter combination.

pic2.png

Kindly provide a solution.

Regards,

Gerard

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

Gerard,

I think the problem is that GetFieldSelections(Quarter) returns all selected Quarters, so your comparisons to won't work.

You could get around this using

=SubStringCount(GetFieldSelections(Month,',',100),'Jan')>0 and wildmatch(GetFieldSelections(Quarter),'*Q1*')

or even a bit shorter:

=count({<Month *= {'Jan'}>} Month)

View solution in original post

2 Replies
swuehl
Champion III
Champion III

Gerard,

I think the problem is that GetFieldSelections(Quarter) returns all selected Quarters, so your comparisons to won't work.

You could get around this using

=SubStringCount(GetFieldSelections(Month,',',100),'Jan')>0 and wildmatch(GetFieldSelections(Quarter),'*Q1*')

or even a bit shorter:

=count({<Month *= {'Jan'}>} Month)

Not applicable
Author

Thanks.... Its working.

Regards,

Gerard