Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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
Not applicable

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

Try this:

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

Stefan

3 Replies
celambarasan
Not applicable

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

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
Not applicable

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

Try this:

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

Stefan

Not applicable

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

Thanks guys