Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
DipeshVadgama
Partner - Creator II
Partner - Creator II

Custom Color In Charts

Hi,

I have seen many discussion on custom color change in charts, But I am not sure why my chart is not getting change.

I have attached QVD file. I need like below

2 Replies
YoussefBelloum
Champion
Champion

your coloring expression will not work because it is incomplete

IF(Count({$<[Overdue/Ontime/Completed]={'Completed'}>}[ID Number]),RGB(255,0,0),

IF(Count({$<[Overdue/Ontime/Completed]={'Overdue'}>}[ID Number]),RGB(0,255,0),

IF(Count({$<[Overdue/Ontime/Completed]={'Ontime'}>}[ID Number]),RGB(0,128,0))))

you need to set a condition, which is missing on your expression

example:

IF(Count({$<[Overdue/Ontime/Completed]={'Completed'}>}[ID Number]) = ?,RGB(255,0,0),

IF(Count({$<[Overdue/Ontime/Completed]={'Overdue'}>}[ID Number]) = ?,RGB(0,255,0),

IF(Count({$<[Overdue/Ontime/Completed]={'Ontime'}>}[ID Number]) = ?,RGB(0,128,0))))

you can also use operators like: >, <, >=, <=

L_Hop
Creator
Creator

Hi Dipesh;

I have changed the code little bit. The result is like below. I have added date and [Overdue/Ontime/Completed] column as a dimension than I have counted the ID number.

I have used the below expression for color code;


IF([Overdue/Ontime/Completed]='Completed',RGB(0,255,0),

if([Overdue/Ontime/Completed]='Ontime',RGB(255,0,0),

if([Overdue/Ontime/Completed]='Overdue',RGB(0,0,128))))

I  hope this is what you want.

Screenshot_1.png

Regards;

O.Y