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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
MuraliPrasath
Creator III
Creator III

Nulls in Alternate States Function.

Hi Qlik,

I've used Alternate States  and get null values in following  expression. Can someone help me on this to avoid nulls? 

=only({[Target]}if([Status]='Yes','Yes',
if([Status]='No','No',
if(isnull([Status]),'No',
'No'))))

Labels (1)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

Try to switch places between the if and the only. 

If you are able to simply the expression it could end up like this:

 

If(only({[Target]}Status) ='Yes', 'Yes', 'No') 

View solution in original post

2 Replies
Vegar
MVP
MVP

Try to switch places between the if and the only. 

If you are able to simply the expression it could end up like this:

 

If(only({[Target]}Status) ='Yes', 'Yes', 'No') 

MuraliPrasath
Creator III
Creator III
Author

Thank you so much for your hint 👍. It works as if I expected. You saved my time and energy.