Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I am trying to use custom colors in a pie chart in QlikSense, however, the entire pie chart is using the last color in my expression, independently if they meet the criteria or not. You can the details for my pie chart below:
Measure: Count({$<[Responsible Party]={'Company','Customer','Third Party'}>}[SNOW#])
Colors and Legend > By Expression (This expression is a color code CHECKED).
Color Expression:
if(
wildmatch([Responsible Party],'Company'),
rgb(28,78,128),
if(
wildmatch([Responsible Party],'Customer'),
rgb(234,106,71),
rgb(165,216,221),
)
)
Despite this, it is coloring my entire pie chart to the last color indicated [(165,216,221)] as seen on the below screenshot:
QlikSense version: February 2018 Patch 1 (qliksense server: 12.5.3)
Would appreciate some assistance. Thank you!
And to add to this.. I just tried the same color expression on a bar chart that displays the same data, and it worked... However, I need to be able to color both graphs.
hi
do you use [Responsible Party] as dimension
if so when you use color by dimension do you get different color for each value ?
That is correct. I use [Responsible Party] as dimension and if I select Color by Dimension, a color is assigned to each value as intended. See below:
strange
just checked it in my server and it works ok
can you share a picture of your color settings
Not sure if this is what you mean:
Hi
try to delete the last comma sign,
it's not needed
Hi, thanks for bringing that up, I corrected it. However, it is still not coloring the pie chart.
Hi
can you share a sample data , for example the data behind the chart which is meaning less ,
other way to check will be to create a table and put the color expression as measure and the same dimension , to see the results the function brings back
=if(DECLARATION_TYPE_EN='IMPORT','#8d1b3d',if(DECLARATION_TYPE_EN='EXPORT','#693c26',if(DECLARATION_TYPE_EN='Re-Export','#d96226',if(DECLARATION_TYPE_EN='Temporary Import','#fd9917'))))
i use this it works
try to replace