Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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 (2)
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

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
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