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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Ignore selection in a if match expression

I have multiple measures that I have combined in one loaded table, but some have multiple years and some are for a fixed year.

In my table I am trying to make the data which has multiple years selectable but those which do not will be fixed and not change regardless of whether a year is selected in the multi box.  I can get the data to display using the following if match statement but MeasureID 3 disappears when I select a year combination it doesn't have associated with it:

=if(match([MeasureID],1,2),sum({$<Variable={'a'}>}[Numerator]),
if
(match([MeasureID],3),only({$<Variable ={'a'}>}[ Numerator])))



I tried the following to ignore the year filter, but it just makes MeasureID 3 go blank:

=if(match([MeasureID],1,2),sum({$<Variable={'a'}>}[Numerator]),
if(match([MeasureID],3),only({$<Variable ={'a'}, Year= >}[ Numerator])))

Is this possible?

1 Solution

Accepted Solutions
sunny_talwar

May be try this

=if(Match([MeasureID], 1, 2), sum({$<Variable={'a'}>} [Numerator]),
if(Match(Only({<Year>} [MeasureID]), 3), only({$<Variable ={'a'}, Year= >} [Numerator])))

View solution in original post

2 Replies
sunny_talwar

May be try this

=if(Match([MeasureID], 1, 2), sum({$<Variable={'a'}>} [Numerator]),
if(Match(Only({<Year>} [MeasureID]), 3), only({$<Variable ={'a'}, Year= >} [Numerator])))

Anonymous
Not applicable
Author

Thanks Sunny, this worked perfectly!