Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Block Chart set colour based on Demension

Hi guys

I have a Block chart based on activity, each activity has a category, for example see below

Activity                               Category

Margin                                Financial

Rate                                   Financial

Cert                                   Documentation

Mail                                   Other

The demensions of the block chart is Activity and Category, but I wish to set the colours based on the categories, so all Financial ( either margin or Rate) will be green , all Documentation blue and so on,

Is this possible ? Can anyone help me please ?

Thanks

A

1 Solution

Accepted Solutions

Re: Block Chart set colour based on Demension

Hi,

See the attached sample for clearilty i put this three codes for color definition

=if(Category='Financial',Green(),Green())

=if(Category='Documentation',Red(),Red())

=if(Category='Other',Yellow(),Yellow())

for three categories which are available.

Regards,

Anand

7 Replies

Block Chart set colour based on Demension

Hi,

Yes you can achieve this by set the RGB color for the category and use it ase the base colors.

Regards,

Anand

Re: Block Chart set colour based on Demension

Hi,

You need to set some color code in the Colors property of the chart and set base colors try to put this code =if(Category='Financial',Green(),Green()) and see the result.

Regards,

Anand

Re: Block Chart set colour based on Demension

Hi,

Put this three codes for color setting in Colors properties.

=if(Category='Financial',Green(),Green())

=if(Category='Documentation',Red(),Red())

=if(Category='Other',Yellow(),Yellow())

For the three categories put this three codes and set Persistent colors check mark.

Regards,

Anand

Not applicable

Block Chart set colour based on Demension

Hi Guys,

I have a code written and I have put it in the demensions tab, Background colour , I have tick persistant colours but it does not seem to work ,

the following is the code - I have tried it on the demensions tab under both demensions - perhaps there is an error - please help

Thanks

=if(Structural='Financial', RGB(0,127,0),

if(Structural='Statics' , RGB (255,128,0),

if(Structural='Arrears' , RGB (255,0,0),

if(Structural= 'Documentation',RGB(255,50,50),

if(Structural= 'General', RGB ( 0,57,01),

if(Structural= 'Mails',RGB(200,127,00),

if(Structural = 'Reports',RGB(255,127,0),

RGB(255,255,255))))))))

Re: Block Chart set colour based on Demension

Hi,

See the attached sample for clearilty i put this three codes for color definition

=if(Category='Financial',Green(),Green())

=if(Category='Documentation',Red(),Red())

=if(Category='Other',Yellow(),Yellow())

for three categories which are available.

Regards,

Anand

john_duffy
Contributor III

Re: Block Chart set colour based on Demension

Hello.

Another option would be to use your If statement to set the expressions background colour.

See the attached example.

John.

Not applicable

Block Chart set colour based on Demension

Perfect guys

Both solutions work as I wish,

many thanks

Community Browser