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

Custom Colors

HI all,

jgd

I am using below Measures and dimensions. I am finding difficulty in writing expression for custom color please help on it,

Dimension:

1. If(Match(client_id, '15','12','13','19','6'),client_id)

2. Week_group

Measure:

count({<weekstart={">=$(=date(max(weekstart)-35))<$(=date(max(weekstart)-7))"},DateType={'invitation'},

client_id = {'15','12','13','19','6'}>}invitation_id)

I need a custom color for bars which representing the counts of last 4 weeks for the client_id's.

Color.png

Regards,

Kumar

11 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Why don't you just use client_id as the dimension, and the expression:

count({<weekstart={">=$(=date(max(weekstart)-35))<$(=date(max(weekstart)-7))"},DateType={'invitation'}>}invitation_id)


>>need a custom color for bars which representing the counts of last 4 weeks for the client_id's.

The same colour for all clients? You only have 4 weeks on the chart.



Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

I need only 5 client_id's, so i am using Valuelist.

Same colour for all clients, But the bar colors should be : Light Gray, Dark Gray, Light Blue & Dark Blue.

jonathandienst
Partner - Champion III
Partner - Champion III

>>I need only 5 client_id's, so i am using Valuelist.

That's not a good reason. Rather use a calculated dimension based on client id, like

=If(Match(client_id ,'15','12','13','19','6'), client_id)

or use a set filter in the expression:

=count({<weekstart={">=$(=date(max(weekstart)-35))<$(=date(max(weekstart)-7))"},DateType={'invitation'}, client_id = {'15','12','13','19','6'}>}invitation_id)

>>Same colour for all clients, But the bar colors should be : Light Gray, Dark Gray, Light Blue & Dark Blue

Same colour, but not the same?

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

jagan

Robert_Mika

Anyone help on this?

Not applicable
Author

A‌nd you from me!?

Not applicable
Author

In above attached picture you can see 5 clusters, each cluster has 4 bars, some cluster has only one and three because they are zero values.

Now I need bar colors like below

1 Light Gray,

2 Dark Gray,

3 Light Blue &

4 Dark Blue.

reddy-s
Master II
Master II

Hi Promodgc3,

Try doing this:

I have attached a sample qvf for colouring measures.

Re: How to use custom colours in a stacked bar chart

Not applicable
Author

I have added two dimensions for bar chart, in X-axis it is displaying both client and week labels,

Is their any way to display only client and exclude week labels, as week labels is showing in legend, it's not necessary.

reddy-s
Master II
Master II

Hi Pramod,

I am afraid that you cannot restrict only one dimension label. Hiding both is possible but not 1.