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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

AND-OR in Qlikview Expression

Hi,

I am new to Qlikview.I am struggling hard to get the below  conditions into an expression.

Any ideas??

(JoinDate < Getdate() And Active = 1) OR

(JoinDate <= Getdate() And TerminationDate >=Getdate() And Active = 0)

5 Replies
tresesco
MVP
MVP

This?

IF(

(JoinDate < Getdate() And Active = 1) OR

(JoinDate <= Getdate() And TerminationDate >=Getdate() And Active = 0),

<Your expression for TRUE>,

<Your expression for FALSE>

)

Not applicable
Author

No I want the Expression in this format:

I am taking Count(Distinct USerID) based on two conditions.If i have to Use OR how should i extend my expression?

Count({<JoinDate={'<$(=Only(EndDate))'},Active={0}>} Distinct UserID)

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

For the OR condition in the set modifier you can use the + operator:

Count({<JoinDate={'<$(=Only(EndDate))'},Active={0}>+<...Second set of conditions here...> } Distinct UserID)


talk is cheap, supply exceeds demand
tresesco
MVP
MVP

OR ('+'):

Count({<JoinDate={'1/1/12'}>  + <Active={0}>} Distinct)  // just an example for OR (here + operator)

Similarly for AND you can use '*' operator

Not applicable
Author

Thanks All.

Let me try .