Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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

1 Solution

Accepted Solutions
MVP
MVP

Re: Conditional expression issue

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)

2 Replies
MVP
MVP

Re: Conditional expression issue

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

Re: Conditional expression issue

Thanks.... Its working.

Regards,

Gerard

Community Browser