Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Become an analytics expert with Qlik's new 15 week course: Applied Data Analytics using Qlik Sense. READ MORE
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
Partner

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

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

View solution in original post