Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
mparker123
Creator
Creator

Background Color in a pie chart

Hello All,

I am building a pie chart and having and issue with the background color under the expressions tab. I have values called Issue Types and I created a set analysis to take out the values that I don't want. However, when I put the background color in, the pie chart shows the values that the set analysis took out. I am using the following formula in the "Background Color" expression:

=If(issue_type='PLandG',RGB(252,115,98),If(issue_type='GConfig',RGB(141,170,203),If(issue_type='MDB Config',RGB(187,216,84),If(issue_type='OnBC',RGB(255,217,47),If(issue_type='Con',RGB(102,194,150),if(issue_type='GLR',RGB(229,182,148),If(issue_type='P',RGB(231,138,210),If(issue_type='FC',RGB(179,179,179),If(issue_type='CA&R',RGB(166,216,2227),If(issue_type='TSC',RGB(171,233,188),If(issue_type='TDMSBandS',RGB(27,125,156),If(issue_type='OMSC',RGB(255,191,201),If(issue_type='P:P',RGB(77,167,65),If(issue_type='CA',RGB(196,178,214),If(issue_type='CR',RGB(178,36,36),If(issue_type='D',RGB(0,172,172),If(issue_type='CB',RGB(190,108,44))))))))))))))))))

Is their something missing from the formula that would be causing the chart to show the values that I excluded?

Labels (1)
1 Solution

Accepted Solutions
ahaahaaha
Partner - Master
Partner - Master

Hi,

If I understood you correctly, may be as in attached file.

Regards,

Andrey

View solution in original post

10 Replies
hector_munoz
Specialist
Specialist

Hi Matt,

Could you attach a sample? Anyway I would recommend you to create a new table with issue_type field values and their R, G and B components and later use these new fields in the expression in order to simplify it:


Script part:


COLOURS:

LOAD * INLINE [

issue_type, R value, G value, B value

PLandG,252,115,98

GConfig,141,170,203

OnBC,255,217,47

...

];

Design part:

= Rgb(Avg([R value]), Avg([G value]), Avg([B value]))

Regards,
H

mparker123
Creator
Creator
Author

Unfortunately I can't attach a sample. I also don't know how to enter data in the script the script was designed by someone else in our company so do not want to add to it and potentially mess it up.

Is their a way to do it in the "Background Color" expression using the formula above.

avinashelite

Please attach a sample so that it would be helpful for us to understand the issues

vishsaggi
Champion III
Champion III

Make a copy of your sample qvw file if you dont want to mess the original one. Just rename the copied file and upload here using scrambling technique. Personally i am not very keen in using Pie chart for data display, if i can express the data in a comprehensive way to the user with any other objects ignoring Pie chart, i would do that.

You can scramble data:

Preparing examples for Upload - Reduction and Data Scrambling

mparker123
Creator
Creator
Author

i attached a sample to my original post

ahaahaaha
Partner - Master
Partner - Master

Hi,

If I understood you correctly, may be as in attached file.

Regards,

Andrey

mparker123
Creator
Creator
Author

The values in black are the values that should be excluded. As they are excluded in the set analysis

mparker123
Creator
Creator
Author

Thank You that worked perfectly

ahaahaaha
Partner - Master
Partner - Master

Was glad to help you