Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

ahaverkamp
New Contributor

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

Re: Suppress zero values in Qlik Sense Pie Chart

Try with

RangeMax(1,

count(DISTINCT

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

[People ID]))

2 Replies
Employee
Employee

Re: Suppress zero values in Qlik Sense Pie Chart

Try with

RangeMax(1,

count(DISTINCT

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

[People ID]))

ahaverkamp
New Contributor

Re: Suppress zero values in Qlik Sense Pie Chart

That did the trick. Thank you!!

Community Browser