13 Replies Latest reply: Jun 17, 2016 10:39 AM by Ralf Becher

# Qliksense Pie Chart: Excluding Null values

I have a pie chart showing the percentage of male/female answered our questionnaire, but there are some null values for some purposes, I tried to filter in the calculation field:

if([c-i-hh_gender]= Null() ,null(),count(KEY))

It didn't work for me.

P.S. I'm using Qliksense.

• ###### Re: Qliksense Pie Chart: Excluding Null values

If it is a Qlik Sense question, post it in the Qlik Sense area, not in Qlik Datamarket .

I moved the topic, so this time you can forget about the comment.

• ###### Re: Qliksense Pie Chart: Excluding Null values

Try this:

Count({<KEY = {"=Len(Trim([c-i-hh_gender])) = 0"}>}KEY)

• ###### Re: Qliksense Pie Chart: Excluding Null values

Just exclude Null values in dimension properties.

• ###### Re: Qliksense Pie Chart: Excluding Null values

Hi Ralf,

That works only in Sense, when you have values without connected dimension.

Man | Woman | -

10    |  10         | 5

You can with that filter out the -, 5 column.

G.

• ###### Re: Qliksense Pie Chart: Excluding Null values

How else you can have nulls in a pie chart?

• ###### Re: Qliksense Pie Chart: Excluding Null values

Hi Ralf,

Short example:

Man | Woman | Other

10    |  10        |    -

A table (fact):

ID     S     Value

1     Man      5

2     Woman 6

3     Man      5

4     Woman 4

B table (dimension):

Man

Woman

Other

G.

• ###### Re: Qliksense Pie Chart: Excluding Null values

But the (right) expression Sum(Value) will never gets you NULL.

• ###### Re: Qliksense Pie Chart: Excluding Null values

Ralf, I don't use Sum, we use count of records in this situation as each record represents one person.

Thanks, -Hanan

• ###### Re: Qliksense Pie Chart: Excluding Null values

Of course, but if Gender is dimension why you would need a set analysis fiter?

• ###### Re: Qliksense Pie Chart: Excluding Null values

Because I have NULL values or records without asking what is the gender of the person and that is done on purpose. So it means nothing to me if it says 10% Null value, I don't need this value, I need to deal with the gender value in a way which is different from the null value sample.

• ###### Re: Qliksense Pie Chart: Excluding Null values

Sure, but why not upload an example to get helped in the right way?

• ###### Re: Qliksense Pie Chart: Excluding Null values

Hi Hanan,

Try this: if(count(KEY)=0,'',count(Key))

G.

• ###### Re: Qliksense Pie Chart: Excluding Null values

Thanks All and Sunny