Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

shwetapsarda
New Contributor II

Pie chart : How to deal with Nulls

Hi,

I want to make a pie chart by

dimension as State and measure as exposure.

Also I want to show top 5 states on chart and remaining as others. I did this by

My Graph shows

Problem: Here yellow portion which shows 4% are having State value as 'Null'. I want to show these Nulls to include into  the 'Others' and want only 5 states with valid value to be displayed. How to do this?

Thanks,

Shweta

Tags (2)
10 Replies
uday_pasupuleti
Contributor II

Re: Pie chart : How to deal with Nulls

Replace nulls as N/A in the script.

shwetapsarda
New Contributor II

Re: Pie chart : How to deal with Nulls

Sorry.. I didn't get this. Can you please explain little in detail. I don't want to exclude those values in pie chart.

uday_pasupuleti
Contributor II

Re: Pie chart : How to deal with Nulls

In ur script do the following

if(isnull(field),'N/A',field) as Field

By doing this ur nulls become N/A and this will club into the others.

To show values instead of share then the change the option share to value in Presentation-ValueLabels

consultant_bi
Contributor

Re: Pie chart : How to deal with Nulls

hello

on the pie chart dimension put on your expression the following :


if(len(State)=0,'N/A',State)

shwetapsarda
New Contributor II

Re: Pie chart : How to deal with Nulls

Thanks you Uday and Fathi,

I tried both options which gives me graph as

This is not counting 'N/A/ as Others.

Is this to deal with Qlik version? I am using Qlik Sense 3.1

Thanks,

Shweta

shwetapsarda
New Contributor II

Re: Pie chart : How to deal with Nulls

Thanks you Uday and Fathi,

I tried both options which gives me graph as

This is not counting 'N/A/ as Others.

Is this to deal with Qlik version? I am using Qlik Sense 3.1

Thanks,

Shweta

consultant_bi
Contributor

Re: Pie chart : How to deal with Nulls

do you want to hide the null values ? or you want to display them with a name as we show you ?

consultant_bi
Contributor

Re: Pie chart : How to deal with Nulls

if you want to hide the null values

Sans titre.png

logically the others contain a lot of different values of state and all have less than the top 5 in your example and the null values is considerated as one state this is why it's counted with the top 5

shwetapsarda
New Contributor II

Re: Pie chart : How to deal with Nulls

Thanks,

I don't want to hide those Null Values. I just want to show them as a part of OTHERS. I want

top Four states and one Other to display in Pie Chart.

Other should have remaining states and Nulls irrespective of its share value.

Community Browser