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
Qlik Insider - Maximize your investment, Join this webinar, May 26th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
ioannagr
Creator III
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
Dmk
Contributor II
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"}

View solution in original post

5 Replies
Dmk
Contributor II
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"}

View solution in original post

Anil_Babu_Samineni

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

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

ioannagr
Creator III
Creator III
Author

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

sunny_talwar

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)