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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression using or, and

I need do a expression like this:

=count({$<B1_SU = {"8"} .or. B1_SU = {"12"}>} D2_QUANT)

Many conditions with the same field

it's possible?

1 Solution

Accepted Solutions
erichshiino
Partner - Master
Partner - Master

It can be very simple:

count({$<B1_SU = {'8','12'}>} D2_QUANT)

or even

count({$<B1_SU = {8, 12}>} D2_QUANT)

Regards,

Erich

View solution in original post

5 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

What is the condition to use B1_SU = {"8"} and B1_SU = {"12"}.  Try this

=count({$<B1_SU = {"$(=If(Condtion, 8, 12))"}>} D2_QUANT)

Regards,

Jagan.

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

   Check with this

      =count({<B1_SU = {8}>+<B1_SU = {12}>} D2_QUANT)

using set operators

Celambarasan

erichshiino
Partner - Master
Partner - Master

It can be very simple:

count({$<B1_SU = {'8','12'}>} D2_QUANT)

or even

count({$<B1_SU = {8, 12}>} D2_QUANT)

Regards,

Erich

Anonymous
Not applicable
Author

That works when it's a single column basing on two values but what about an "or" when it's two values

Using the above example: 

This is assuming both values are in B1_SU

count({$<B1_SU = {'8','12'}>} D2_QUANT)

but what if I am looking at

B1_SU = {'8','12'}  or B2_SU = {'3','5'} 

So the "or" is based on two different columns.

Thanks

nagaiank
Specialist III
Specialist III

You may use

count({$<B1_SU = {8, 12}> + <B2_SU = {3, 5}>} D2_QUANT)