Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
Partner
Partner

If() text condition help

Hello,

I want to sum([Alerts]) if (impact='1*'), or if (impact='2*'), up until impact='4*' as a measure in a bar graph.

If I write

=Sum({<Impact={"1*"}>}[Alerts])

it works fine, but I can no longer filter on impact types.

I'd like to have something like 

=if(impact='1*', Sum(Alert))

or 

=if(WildMatch(Impact, '1*'),Sum([Alert]))

but neither of those works.

Any idea of what I'm doing wrong ?

Labels (2)
1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Re: If() text condition help

Hi,

If u want filter on impact types,

U need "*":

=Sum({<Impact*={"1*"}>}[Alerts])

View solution in original post

3 Replies
Highlighted
Partner
Partner

Re: If() text condition help

Hi,

If u want filter on impact types,

U need "*":

=Sum({<Impact*={"1*"}>}[Alerts])

View solution in original post

Highlighted
Partner
Partner

Re: If() text condition help

Well, it seems to work fine if I flip it around : 

=Sum(if(Left(Impact, 1)='1',Alerts,0))

Thanks anyway, hope this helps someone in the future ! 

Partner
Partner

Re: If() text condition help

Or that, I just checked and it works.

Thank you, it looks cleaner than my solution !