Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
alisonpwallis
Creator
Creator

Alternate state and if statement

Hi,

I have a radar chart showing two groups - our organisation and the sector. The sector group can be divided into three categories and what I want to do is show on the chart label which group is being selected. I can do this with an if statement but the issue I'm having is that I have the sector data as an alternate state and I can't get the IF statement to work for the alternate state. Here is my statement:

=if([Inst/Inst Group]='Benchmark','Benchmark', if([Inst/Inst Group]='Competitor','UCAS competitor',if([Inst/Inst Group]='Other','Sector')))

Where do I put the alternate state in the syntax?

Thanks

Alison

1 Solution

Accepted Solutions
jerem1234
Specialist II
Specialist II

Try this:

pick(match(only({State1}[Inst/Inst Group]), 'Benchmark', 'Competitor', 'Other'), 'Benchmark', 'UCAS competitor', 'Sector')

Hope this helps!

View solution in original post

2 Replies
jerem1234
Specialist II
Specialist II

Try this:

pick(match(only({State1}[Inst/Inst Group]), 'Benchmark', 'Competitor', 'Other'), 'Benchmark', 'UCAS competitor', 'Sector')

Hope this helps!

alisonpwallis
Creator
Creator
Author

That's great - thank you!


Alison