Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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"}
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)
@Dmk sorry, meant to write sum({<id1={"="len(id1)={'0'}"}>*<id2={"="len(id2)={'0'}"}>*<id3={"*"}>}bags)
@Anil_Babu_Samineni none works 😫 gives me zero but i know it's not a right number. Thanks anyway
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)
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.