Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Contributor II

Set Analysis len(Type)=0

Hi guys,

I have a confusion. I have a table like:

Category   Price

Null               1

' '                    5

A                     7


I would like to sum up prices for both Null and blank categories, which should be 1+5=6


If I do set analysis Sum({<Category={"=len(trim(Category))=0"}>}Price), it only gives me 5.

But if I do Sum(if(len(trim(Category))=0,Price,0)), it gives correct result 6.


I'm wondering how to fix the set analysis. Any advice helps!

1 Reply
MVP & Luminary
MVP & Luminary

Re: Set Analysis len(Type)=0

Try this instead: Sum({<Price={"=len(trim(Category))=0"}>}Price)

Why? Because you can't select Category values that don't exist.

talk is cheap, supply exceeds demand