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

In Set Analysis can you exclude certain values but still count nulls

Hi, I'm trying to exclude certain values from being counted in an Expression, but still want nulls to be counted,

The following script is designed to count the number of students who are PG and Awarded e.g. count number of Internal IDs where the Level Code is PG and Award Status is AW

Count({$< [Level Code] = {'PG'}, [Award Status] = {'AW'}> [Internal ID])

However, I also need to exclude records where another field, the Honour Code, has a value of 3

Count({$< [Level Code] = {'PG'}, [Award Status] = {'AW'}, [Honour Code] -= {'3'}> [Internal ID])

This works and records where the Honour Code = 3 are excluded from the count, however (as expected) all records where the Honour Code is Null are also  excluded from the count and they need to be included.

Is there a way of excluding certain values from a count, whilst still counting the Nulls?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try this:

Count({$< [Level Code] = {'PG'}, [Award Status] = {'AW'}>-< [Level Code] = {'PG'}, [Award Status] = {'AW'}, [Honour Code] = {'3'}> [Internal ID])

Stefan

View solution in original post

3 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     You can try with this

     Count({$< [Level Code] = {'PG'}, [Award Status] = {'AW'}, [Honour Code] =[Honour Code] - {'3'}> [Internal ID])

     or

     Count({$< [Level Code] = {'PG'}, [Award Status] = {'AW'}, [Honour Code] =P([Honour Code]) - {'3'}> [Internal ID])

Celambarasan

swuehl
MVP
MVP

Try this:

Count({$< [Level Code] = {'PG'}, [Award Status] = {'AW'}>-< [Level Code] = {'PG'}, [Award Status] = {'AW'}, [Honour Code] = {'3'}> [Internal ID])

Stefan

Not applicable
Author

Thanks guys