Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ltc
Partner - Creator
Partner - Creator

Expression to color Null Values on Pie/Donut Chart

Hi Qlik Community,

I have a donut chart with null values.  I have renamed the null values to "Not Uploaded" via an expression, as seen in the image below.  Now I need to color the "Not Uploaded" values yellow.  I want to use the standard Qlik Sense yellow from their color scheme "12 Colors".  See below.

What is the expression for this?

My field name is "CCaR User DD2875 Is Valid"

Thanks so much!

Donut.pngcolor yellow.png

11 Replies
vishsaggi
Champion III
Champion III

Did you already wrote an expression in your script for your null values to Not Uploaded? If yes then may be just use like

IF(CCaR user DD2875 Is Valid = 'Not Uploaded', RGB()yourYelloColorvalue)

ltc
Partner - Creator
Partner - Creator
Author

I'm not the owner of the app, so I don't have access to the data load editor/script.  I was just going to add the expression here:

appearance.png

I tried your expression as follows, but it turned the whole donut grey. 

IF([CCaR User DD2875 Is Valid] = 'Not Uploaded', RGB(255,255,0))

ltc
Partner - Creator
Partner - Creator
Author

grey donut.PNG

vishsaggi
Champion III
Champion III

Oh ok.  I believe then it should be used this way. Could you able to share this app if possible?

ltc
Partner - Creator
Partner - Creator
Author

I can't share it

Any other ideas?

ltc
Partner - Creator
Partner - Creator
Author

I know what the problem is, but I don't know how to fix it.

I have the following expression under Data, Dimension:

=if(Len([CCaR User DD2875 Is Valid])=0,'Not Uploaded',[CCaR User DD2875 Is Valid])

This is what's causing the color expression to not work

ltc
Partner - Creator
Partner - Creator
Author

Actually, that's not the problem.  Because I am able to color the "No" portion of the donut with no problem

This expression does work:

IF([CCaR User DD2875 Is Valid] = 'No', RGB(255,255,0))

ltc
Partner - Creator
Partner - Creator
Author

It's not coloring the "Not Uploaded" value maybe because it's a Null value

vishsaggi
Champion III
Champion III

Not sure, i will have to create some dummy data then play around with it and get back.