Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis question - AND or OR

Hello,

I have a chart with the following expression:

count(distinct{$ <SASTATUS.SA_STATUS_DESCRIPTION = {'Closed'},

      SATYPE.CATEGORY = {'Domestic'},

       PREM.REG_STATUS = {'N'},

        PREM.ENER_FLG = {'D'}>}MPRN.MPRN)


However, there is someone with more than one SA_STATUS_DESCRIPTION (he has one of Combined as well as Closed.)

My question is why is he not excluded? Does he need to meet SOME of the conditions or ALL of the conditions?

If it is searching for people that meet SOME of the conditions, then why are people with more than one

SATYPE.CATEGORY not appearing (for example).

Is there an order that needs to be applied?

Any advice gratefully received.

Thanks

Rachael

3 Replies
gandalfgray
Specialist II
Specialist II

The data needs to meet all your conditions (it works like AND).

The order of the conditions is not important (in this case at least).

If "someone" has several SASTATUS.SA_STATUS_DESCRIPTION

what you get using your set statement is the records matching "Closed"

(and all of your other conditions)

perumal_41
Partner - Specialist II
Partner - Specialist II

Try it .i don't know  this is correct or not

count(distinct{$ <SASTATUS.SA_STATUS_DESCRIPTION = {'Closed'},
      SATYPE.CATEGORY = {'Domestic','International'},
       PREM.REG_STATUS = {'N'},
        PREM.ENER_FLG = {'D'}>}MPRN.MPRN)

brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi,

look in the helpfile for Set analysis and here for the operators +, -, * and /. You can combine your selections by adding conditions.