Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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
MVP
MVP

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
MVP
MVP

Try this:

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

rbecher
Partner - Master III
Partner - Master III

Just exclude Null values in dimension properties.

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine
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
Partner - Master III
Partner - Master III

How else you can have nulls in a pie chart?

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine
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
Partner - Master III
Partner - Master III

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

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine