6 Replies Latest reply: Jun 10, 2015 12:14 AM by Trey Smith

OR Statement within Set Analysis

What is the correct syntax of an OR statement of two different field conditions in set analysis?

Essentially what I want:

Num(Count(distinct {\$<DateType = {'RequestedDate'}, Date = {'>=\$(v30Days)'},REQUEST_STATUS_GENERIC={'Open'},REQUEST_ORIGINATION = {'Customer'}, REQUEST_SLA_RESPONSE_PASTDUE = {'N'} OR REQUEST_EST_SLA_COMPLETION_TIME  = {'<vCurrentDate)'}>} REQUEST_ID),'#,###')

• Re: OR Statement within Set Analysis

Hi,

Try this

Num(Count(DISTINCT {\$<DateType = {'RequestedDate'},

Date = {'>=\$(v30Days)'},REQUEST_STATUS_GENERIC={'Open'},

REQUEST_ORIGINATION = {'Customer'},

REQUEST_SLA_RESPONSE_PASTDUE = {'N'} >} REQUEST_ID)

+

Count(DISTINCT {\$<DateType = {'RequestedDate'},

Date = {'>=\$(v30Days)'},REQUEST_STATUS_GENERIC={'Open'},

REQUEST_ORIGINATION = {'Customer'},

REQUEST_EST_SLA_COMPLETION_TIME  = {'<vCurrentDate)'}>} REQUEST_ID)

,'#,###')

• Re: OR Statement within Set Analysis

Unfortunately that would cause duplicates if a request meets both criteria.

• Re: OR Statement within Set Analysis

Hi,

You can try

Num(

Count(distinct {\$<DateType = {'RequestedDate'}, Date = {'>=\$(v30Days)'},REQUEST_STATUS_GENERIC={'Open'},REQUEST_ORIGINATION = {'Customer'}, REQUEST_SLA_RESPONSE_PASTDUE = {'N'} >

+

<DateType = {'RequestedDate'}, Date = {'>=\$(v30Days)'},REQUEST_STATUS_GENERIC={'Open'},REQUEST_ORIGINATION = {'Customer'},REQUEST_EST_SLA_COMPLETION_TIME  = {'<vCurrentDate)'}> } REQUEST_ID),'#,###')

Regards

• Re: OR Statement within Set Analysis

So if a request met both criteria, would the Distinct only allow for it to be counted once?

Also, is there no true syntax for an OR statement?

• Re: OR Statement within Set Analysis

Have you tried above solution. In Set Analysis + works like OR Operator

Try it and let me know.

IF possible post your sample app.

Regards

• Re: OR Statement within Set Analysis

You are right, I had brain fart.

Thank you!