Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
shreyandutt1
Contributor II
Contributor II

Select empty records in set analysis

Hello All,

I have a requirement where I have to display the count of items where Premier RM's is not equal to "Premier". If I use Count({<[Premier RM's]-={'Premier'}>} Items), the records with empty or un-associated values in [Premier RM's] field automatically get disregarded and only records with [Premier RM's] = {'Non Premier'} show up (27 in screenshot). My requirement is to get total count 28 (27+1). Attached screenshot has been taken with set analysis commented out on [Premier RM's] field to give you an idea.

shreyandutt1_0-1633645655865.png

Regards,

Shreyan

6 Replies
rubenmarin

Hi, maybe with?: Count(Items)-Count({<[Premier RM's]={'Premier'}>} Items)

kKoumoundouros
Partner - Contributor III
Partner - Contributor III

First  replace the null values with a string character, for example "-", and then use the set analysis:

  • Count({<[Premier RM's] = - {'Premier'}>}Items)

 

shreyandutt1
Contributor II
Contributor II
Author

@rubenmarin thanks for the reply but the expression is much bigger than this, I just included this part to simplify the example. This is what I am planning to implement as a last resort but looking for alternatives as this is quite a common case that may arise. There should be better a way to select empty records in Qlik, no?

shreyandutt1
Contributor II
Contributor II
Author

@kKoumoundouros  thanks but the field doesn't have any nulls as such. They are simply empty records as they don't have any matching associations.

stevejoyce
Specialist II
Specialist II

Try this:

Count({<Items = E({<[Premier RM's]-={'Premier'}>} Items)  >}Items)

Thiago_Justen_

Hi there,

You could also try this out:

Count({<[Premier RM's]-={'Premier'}>+<[Premier RM's]-={"*"}>} Items)

Regards

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago