Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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.

1 Solution

Accepted Solutions
sunny_talwar

Try this:

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

View solution in original post

13 Replies
oknotsen
Master III
Master III

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.

May you live in interesting times!
sunny_talwar

Try this:

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

rbecher
MVP
MVP

Just exclude Null values in dimension properties.

Astrato.io Head of R&D
undergrinder
Specialist II
Specialist II

Hi Hanan,

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

G.

undergrinder
Specialist II
Specialist II

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.

rbecher
MVP
MVP

How else you can have nulls in a pie chart?

Astrato.io Head of R&D
undergrinder
Specialist II
Specialist II

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.

Not applicable
Author

Thanks All and Sunny

rbecher
MVP
MVP

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

Astrato.io Head of R&D