# New to Qlik Sense

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

Announcements
Qlik Insider - Maximize your investment, Join this webinar, May 26th. Register Today
cancel
Showing results for
Did you mean:
Creator III

## is null in set analysis

I'm trying to convert

sum(If(isnull(id1) and isnull(id2) and not isnull(id3), bags)

into set analysis like this, but it doesn't work.

sum({<id1={"="len(id1)={'0'}"}>*<id1={"="len(id1)={'0'}"}>*<id3={"*"}>}bags)

what should i do?

1 Solution

Accepted Solutions
Contributor II

You can create a field in your data:

if(isNull(id1),1,0) as id_null_flag

then just put in set analysis id_null_flag={"1"}

5 Replies
Contributor II

You can create a field in your data:

if(isNull(id1),1,0) as id_null_flag

then just put in set analysis id_null_flag={"1"}

Perhaps this

sum({<id1={"=Len(id1)=0"}, id2={"=Len(id2)=0"}, id3-={"=Len(id3)=0"}>} bags)
Or
sum({<id1={"=Null()"}, id2={"=Null()"}, id3={"=Not Null()"}>} bags)

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)
Creator III
Author

@Dmk sorry, meant to write sum({<id1={"="len(id1)={'0'}"}>*<id2={"="len(id2)={'0'}"}>*<id3={"*"}>}bags)

Creator III
Author

@Anil_Babu_Samineni  none works 😫 gives me zero but i know it's not a right number. Thanks anyway

MVP

Why don't you create a flag in the script like this

``If(isnull(id1) and isnull(id2) and not isnull(id3), 1, 0) as CheckFlag``

and then this

``Sum({<CheckFlag = {'1'}>} bags) ``
Tags