Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get different colours for each member?


Hi,

I have straight table with

Dimension1: StaffMember

Dimension2: Week

Expression1: =(Count({<[Result]={'Pass'}>} Distinct (ID))+Count({<[Result]={'Fail'}>} Distinct (ID)))

Expression2: Count({<[Result]={'Fail'}>} Distinct (ID))

Expression3: Count({<[Result]={'Fail'}>} Distinct (ID))/(Count({<[Result]={'Pass'}>} Distinct (ID))+Count({<[Result]={'Fail'}>} Distinct (ID)))

How can I change the colour of Dimension1 and Dimension2 so that each StaffMember with their corresponding Weeks should get different colours based on individual StaffMembers.

Thanks.

1 Solution

Accepted Solutions
Not applicable
Author

Best approach is in QV Load statement create another column

=if(StaffMember='Smith', yellow(),

if(StaffMember= 'Adam', rgb(255,228,225),

  if(StaffMember= 'Konan', green(), white()))) as BG_Color

now in the Background color use the BG_Color this will be more optmized

View solution in original post

11 Replies
arjunkrishnan
Partner - Creator II
Partner - Creator II

Pls Let Attacht Ur Qvw...

Else

Write Expression On Your Background Color On ur Dimesion Wise

Not applicable
Author

you may define colors (RGB) and load it with your StaffMembers.

Then it will be easy to use those loaded values in charts.

Let me know if it helps or you need some example

regards

Darek

Not applicable
Author

Thanks. Can I have any example?

Not applicable
Author

Hi Amelia

Let me know if that helps!

regards

Darek

Not applicable
Author

Thanks. Actually I am getting data from excel. I need the colour change based on each Member.

Not applicable
Author

You can use the Background color and use ARGB or RGB function. Alternatively if you have only one Dimension then on the color tabs use the Multi colored check box

Not applicable
Author

Thanks. Found answer as

=if(StaffMember='Smith', yellow(),

if(StaffMember= 'Adam', rgb(255,228,225),

  if(StaffMember= 'Konan', green(), white())))

Not applicable
Author

Best approach is in QV Load statement create another column

=if(StaffMember='Smith', yellow(),

if(StaffMember= 'Adam', rgb(255,228,225),

  if(StaffMember= 'Konan', green(), white()))) as BG_Color

now in the Background color use the BG_Color this will be more optmized

Not applicable
Author

Thanks. That's really good.