Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression using an OR clause

I am trying to put together a criteria in an expression.

Essentially an OR case

Currently I have :

count({<Stream={'1'}>} CarNP)

I want to add where it is Stream 1 OR Colour like Red. As the cars maybe in Stream 1 or in another stream but have red within the colour field

count({<Stream={'1'}, Colour = {'*Red*'}>} CarNP)

1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

Try this,

count({<Stream={'1'}> +  <Colour = {'*Red*'}>} CarNP)

View solution in original post

8 Replies
tamilarasu
Champion
Champion

Try this,

count({<Stream={'1'}> +  <Colour = {'*Red*'}>} CarNP)

Chanty4u
MVP
MVP

try

count({<Stream={'1'} and Colour = {'*Red*'}>} CarNP)

Not applicable
Author

=count(if([Stream] = '1' OR 'Colour = '*Red*' , CarNP)) ;

Kushal_Chawda

=Count(if(Stream='1' or Colour like '*Red*',CarNP))

chetansehgal
Creator
Creator

=count({<Colour={'RED'}>+< Stream={1}>}CarNP)  works fine.

jonathandienst
Partner - Champion III
Partner - Champion III

The suggestion by tamilarasu is the correct one. Some of the others will work, but will not be as quick. Others will not work at all.

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

I second that

swuehl
MVP
MVP

Maybe it's also possible to use

=Count({<CarNP = p({<Stream={'1'}>}) + p({<Colour = {'*Red*'}>}) >} CarNP)


avoiding the union of two record sets