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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
AbFab
Contributor
Contributor

Multi condition text query

Hi,

Brand new to Qlik Sense and I'm trying to construct a query, all I need is an output in a table.  In words my logic looks like this - the "-" are because they are returned for a null, not because they are input as a "-", but I can't filter in the application on the null:

Return my data if:

FieldA="textA" and FieldW="-"

Or

FieldA="textB" and FieldX="-"

Or

FieldA="textC" and FieldZ="-"

At the moment I'm just doing exports and Excel filtering, I'd love if I can get a query to do it!!!

Thanks in advance...

Labels (1)
4 Replies
martinpohl
Partner - Master
Partner - Master

under dimensions, FieldW, uncheck null values

Regards

AbFab
Contributor
Contributor
Author

Hi,

Thanks, but I perhaps didn't explain properly.

I've got "or" on these three conditions.  The conditions being that FieldA will have one of a few values and depending on the value I want to retrieve those that have a null in the relevant corresponding field.

So whatever is in FieldA tells me what it ought to be mapped to and then if there is a null under that mapping (FieldW, X or Z depending on what textA is) I need to input it in a database elsewhere so I want to filter on the null rather than exclude the null.

AbFab

Kushal_Chawda
MVP
MVP

what are the dimension and expression you are using?

jonathandienst
Partner - Champion III
Partner - Champion III

To compare null values, use IsNull() or Len() = 0:

FieldA="textA" and IsNull(FieldW) 
Or
FieldA="textB" and IsNull(FieldX) 
Or
FieldA="textC" and IsNull(FieldZ) 

 

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein