Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
shwetapsarda
Contributor II
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

10 Replies
Uday_Pasupuleti
Partner - Creator III
Partner - Creator III

Replace nulls as N/A in the script.

shwetapsarda
Contributor II
Contributor II
Author

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
Partner - Creator III
Partner - Creator III

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

hello

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


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

shwetapsarda
Contributor II
Contributor II
Author

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
Contributor II
Contributor II
Author

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

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

consultant_bi
Creator
Creator

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
Contributor II
Contributor II
Author

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.