
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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"}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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"}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Dmk sorry, meant to write sum({<id1={"="len(id1)={'0'}"}>*<id2={"="len(id2)={'0'}"}>*<id3={"*"}>}bags)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Anil_Babu_Samineni none works 😫 gives me zero but i know it's not a right number. Thanks anyway

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
seems Set analysis doesnt work for this use case. Perhaps as null are not selectable then it doesnt work in Set analysis. Seems like a gap to me. If anyone else has ever got this to work let us know. I tried all the set analysis suggestions and resorted to the flag approach in the end too.
