Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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

Tags (1)
11 Replies
MVP
MVP

Re: Custom Colors

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.



Not applicable

Re: Custom Colors

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.

MVP
MVP

Re: Custom Colors

>>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?

Not applicable

Re: Custom Colors

jagan

Robert_Mika

Anyone help on this?

Not applicable

Re: Custom Colors

A‌nd you from me!?

Not applicable

Re: Custom Colors

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.

reddys310
Honored Contributor II

Re: Custom Colors

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

Re: Custom Colors

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.

reddys310
Honored Contributor II

Re: Custom Colors

Hi Pramod,

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

Community Browser