Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

lsteere01
New 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

Re: Mixing AND and OR conditions in Set Analysis

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)

3 Replies
Not applicable

Re: Mixing AND and OR conditions in Set Analysis

Maybe this:

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

Not applicable

Re: Mixing AND and OR conditions in Set Analysis

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
New Contributor

Re: Mixing AND and OR conditions in Set Analysis

That works. Thanks!

Community Browser