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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
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)

Labels (1)
5 Replies
tresB
Champion III
Champion III

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
tresB
Champion III
Champion III

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 .