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

Suppress zero values in Qlik Sense Pie Chart

I've created a pie chart in Qlik Sense that uses the following expression:

count(DISTINCT

{$<[Employment History.Employment Rank]={"1"}>}

[People ID])

The Employment History.Employment Rank field is a calculated field in the script that assigns the latest Employment History record for each distinct People ID with a value of 1 - this way I'm able to show only the latest record for each person.

However, when I use the previous expression to create a pie chart, I receive the following warning beneath my chart: "This data set contains negative or zero values that cannot be shown in this chart."

I understand it's because for my chosen dimension, there are some records that don't have any ranking of 1. My question: is there a way to exclude those records from my expression, or is there a setting within the chart that will ignore this case?

Thanks in advance.

1 Solution

Accepted Solutions
Clever_Anjos
Employee
Employee

Try with

RangeMax(1,

count(DISTINCT

{$<[Employment History.Employment Rank]={"1"}>}

[People ID]))

View solution in original post

2 Replies
Clever_Anjos
Employee
Employee

Try with

RangeMax(1,

count(DISTINCT

{$<[Employment History.Employment Rank]={"1"}>}

[People ID]))

Anonymous
Not applicable
Author

That did the trick. Thank you!!