Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to use multiple conditions?

Hi all,

I want to write a statement like below but it doesn't work.

count({<[visit state]={"yes"} , [order state]={0} or [state number]>=130511>} terminal )

In another word, I want to count terminals that visited and they have order to visit, or they have state number bigger than 130511.

I wonder if you could help me?


8 Replies
tresesco
MVP
MVP

May be like:

count({<[visit state]={"yes"} > * (< [order state]={0}>+< [state number]={'>=130511'}>)} terminal )

or

count({<[visit state]={"yes"} , [order state]={0}>+<[visit state]={"yes"} , [state number]={'>=130511'}>} terminal )


Edit: corrected a brace in the second solution.

ahaahaaha
Partner - Master
Partner - Master

Hi,

Maybe something like this?

count({<[visit state]={'yes'}, [order state]={'0'}, [state number]={">=130511"}>} terminal )


Regards,

Andrey

Not applicable
Author

Thank you in advance but unfortunately any of them didn't work.

Not applicable
Author

Dear Andrey,

Thank you for your comment. But it didn't work.

In addition I think I should use or function. But I have problem with the function.

adamdavi3s
Master
Master

count({<[visit state]={"yes"} , [order state]!={0},[state number]={">=130511"}>} terminal ) + count({<[visit state]={"yes"} , [order state]={0},[state number]={"<130511"}>} terminal )

Not applicable
Author

Hi,

I think Treseco B second solution is ok but there was mistake in parenthesis. The correct one is below:

count({$<[visit state]={"yes"} , [order state]={0}>+<[visit state]={"yes"} , [state number]={'>=130511'}>} terminal )

BR,

Milosz

sasiparupudi1
Master III
Master III

=count({<[visit state]={"yes"}>+<[order state]={0}>+<[state number]={'>=130511'}>   } terminal )
HirisH_V7
Master
Master

Hi

you can write like this,

If([order state]='0' and [state number]>=130511,

count({<[visit state]={"yes"}>} terminal ))

OR

If([order state]='0' or [state number]>=130511,

count({<[visit state]={"yes"}>} terminal ))

HTH,

Hirish

HirisH
“Aspire to Inspire before we Expire!”