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: 
lsteere01
Contributor
Contributor

Mixing AND and OR conditions in Set Analysis

I need to do a set analysis with the following logic:

(INPATIENT_VISIT={1}  or  OBSERVATION_VISIT={1}) and (DISCH_GAP_CHART_LOOKBACK_INCLUDE={1})

I've trid the following but it dosn't work:

Median({1<INPATIENT_VISIT={1}> + <OBSERVATION_VISIT={1}>,  <DISCH_GAP_CHART_LOOKBACK_INCLUDE={1}>} IPOB)

Any help would be appreciated.

Thanks.

1 Solution

Accepted Solutions
Not applicable

Update i didn't notice your brackets around OR so I think this should serve the purpose

Median({1<INPATIENT_VISIT={1} , DISCH_GAP_CHART_LOOKBACK_INCLUDE={1}>  + 

                <OBSERVATION_VISIT={1},  DISCH_GAP_CHART_LOOKBACK_INCLUDE={1}>} IPOB)

View solution in original post

3 Replies
Not applicable

Maybe this:

Median({1<INPATIENT_VISIT={1}> + <OBSERVATION_VISIT={1} , DISCH_GAP_CHART_LOOKBACK_INCLUDE={1}>} IPOB)

Not applicable

Update i didn't notice your brackets around OR so I think this should serve the purpose

Median({1<INPATIENT_VISIT={1} , DISCH_GAP_CHART_LOOKBACK_INCLUDE={1}>  + 

                <OBSERVATION_VISIT={1},  DISCH_GAP_CHART_LOOKBACK_INCLUDE={1}>} IPOB)

lsteere01
Contributor
Contributor
Author

That works. Thanks!