Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
prashantsanchet
Creator
Creator

qlik

How to write set analysis to get sum of sales for region where region is null;

i.e only null region sales

15 Replies
Chanty4u
MVP
MVP

sum({<region={" "}>}sales)

sunny_talwar

May be flag the null region in the script like this

If(Len(Trim(Region)) = 0, 1, 0) as NullRegionFlag

and then this

Sum({<NullRegionFlag = {1}>}Sales)

Chanty4u
MVP
MVP

try this

sum({$<region={"=isnull(region)"}>} sales)

sunny_talwar

Not going to work

Chanty4u
MVP
MVP

not tested sunny

sunny_talwar

I am letting you know that it is not going to work.... and the reason is that you can't really compare a null field value within set analysis..... if it was white space, this would have worked

sum({$<region={"=Len(Trim(region)) = 0"}>} sales)

Chanty4u
MVP
MVP

Nice sunny let me try with the dummy data for my understanding ....

sunny_talwar

Sounds like a plan... share the sample afterwards as it might help someone else

Chanty4u
MVP
MVP

sure sunny