Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
mg862925
Contributor
Contributor

null count

I want to create a group for following value

I am going to use it as a filter with Yes or No (Swedish Ja/Nej)

if([ClaimId] like 'T48*','Ja',
if([ClaimId] like '=NullCount','Nej'))as Group1,

 

The T48 works

but I cant get the null to work

see my file 

Labels (1)
1 Solution

Accepted Solutions
rogerpegler
Creator II
Creator II

If ClaimID can only start with T48 the Anil's suggestion slightly modified:

if(WildMatch(ClaimId, 'T48*'), 'Ja',  'Nej')as Group1

If there are other possible values then they should really be handled eg:

if(WildMatch(ClaimId, 'T48*'), 'Ja', if(Len(ClaimId)=0, 'Nej','Other')) as Group1

View solution in original post

3 Replies
Mauritz_SA
Partner - Specialist
Partner - Specialist

Hi there

You can try something like:

if([ClaimId] like 'T48*','Ja',if(Len([ClaimId])=0 ,'Nej'))as Group1

If there is a chance that you can have spaces in the blank cells which you would also like to be treated as nulls then use the following:

if([ClaimId] like 'T48*','Ja',if(Len(Trim([ClaimId]))=0 ,'Nej'))as Group1

Good luck!

Mauritz

Anil_Babu_Samineni

Perhaps this?

if(WildMatch(ClaimId, 'T48*'), 'Ja', if(IsNull(ClaimId), 'Nej'))as Group1

Or

if(WildMatch(ClaimId, 'T48*'), 'Ja', if(Len(ClaimId)=0, 'Nej'))as Group1

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
rogerpegler
Creator II
Creator II

If ClaimID can only start with T48 the Anil's suggestion slightly modified:

if(WildMatch(ClaimId, 'T48*'), 'Ja',  'Nej')as Group1

If there are other possible values then they should really be handled eg:

if(WildMatch(ClaimId, 'T48*'), 'Ja', if(Len(ClaimId)=0, 'Nej','Other')) as Group1