
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Coloring a pie chart using an expression
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!
- « Previous Replies
-
- 1
- 2
- Next Replies »

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi
do you use [Responsible Party] as dimension
if so when you use color by dimension do you get different color for each value ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
strange
just checked it in my server and it works ok
can you share a picture of your color settings

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not sure if this is what you mean:


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
try to delete the last comma sign,
it's not needed

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, thanks for bringing that up, I corrected it. However, it is still not coloring the pie chart.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
=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

- « Previous Replies
-
- 1
- 2
- Next Replies »