# Qlik Education Discussions

Discussion Board for collaboration related to Qlik Education. Not applicable

## Null value.

Hi

I have value 1 and - for a dimension called flag. The - is equivalent to null which is the result of left join I have performed. How do I check the - in set analysis to create an expression?

Appreciate any help around this. I read several discussions related to this but nothing helped.

Thanks

Tags (2)
1 Solution

Accepted Solutions
Not applicable

## Re: Null value.

Consider you have below data....

[

Customer, Sales, Flag

A, 10, -

B, 100, 1

C, 50,

D, 40, 1

E, 200,

];

In Text Box, use below expressions.

=SUM(Sales)

Will give you total Sales

=SUM({<Flag = {"=Len(Trim(Replace(Flag,'-','')))>0"}>}Sales)

Will give you SUM(Sales) where Flag is not Null or not -....

=SUM({<Flag = {"=Len(Trim(Replace(Flag,'-','')))=0"}>}Sales)

Will give you SUM(Sales) where Flag = null or -

3 Replies
Not applicable

## Re: Null value.

What type of expression you want? Kindly elaborate little more ! Not applicable

## Re: Null value.

Expression I'm looking for is simple. To check the dimension for null value or - and sum the sales.

Not applicable

## Re: Null value.

Consider you have below data....

[

Customer, Sales, Flag

A, 10, -

B, 100, 1

C, 50,

D, 40, 1

E, 200,

];

In Text Box, use below expressions.

=SUM(Sales)

Will give you total Sales

=SUM({<Flag = {"=Len(Trim(Replace(Flag,'-','')))>0"}>}Sales)

Will give you SUM(Sales) where Flag is not Null or not -....

=SUM({<Flag = {"=Len(Trim(Replace(Flag,'-','')))=0"}>}Sales)

Will give you SUM(Sales) where Flag = null or -