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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
qliknewbie2
Contributor
Contributor

How can I avoid displaying 'else' results from if statement?

Hi all,

I am trying to figure out how to not display the 'else' results in a bar chart. 

I have a status that can change over a number of periods and the max period for each ID and I only want to see the status of the most recent period. My measure is number of IDs and my dimension that generally works is:

=if(Period= [Max Period],[Status])

Is there a way to include do something like

=if(Period= [Max Period],[Status], 'All other periods')

and then not display 'All other periods' on the chart?

I don't want to use the 'Include nulls' option as I have nulls that are not due to the if statement which have meaning that I want displayed (some have no info on status in their max period).

Thanks

1 Reply
abhijitnalekar
Specialist II
Specialist II

Hi @qliknewbie2,

I can think for a workaround like below by unchecking the include null values checkbox, 

Check the below expression if that works for you.

 

if(Period= [Max Period],coalesce([Status],'NO Status'))

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!