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

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
Gysbert_Wassenaar

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