Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Color a Master dimension used in a bar chart

Hi all,

I'm using the master dimension below as one of my bar chart' dimensions (the other one is a time dimension). Does anyone knows how can personalize the bars' color?

=if(AllocTransfOrigContribEurTon>AllocTransfDestContribEurTon, 'DOWNGRADE',

    IF((AllocTransfDestBusinessTp='OPPORTUNIT' and AllocTransfOrigBusinessTp<>'OPPORTUNIT') OR (AllocTransfDestBusinessTp<>'OPPORTUNIT' and AllocTransfOrigBusinessTp='OPPORTUNIT'), 'OPPORTUNITY TYPE',

        IF(AllocTransfOrigMillCd<>AllocTransfDestMillCd, 'DIFFERENT MILL',

        'OK')))

Thank you!!

5 Replies
adityaakshaya
Creator III
Creator III

Hi Sofia,

As per my understanding, you have two dimension and you want to fix the color for the calculated dimension mentioned in the statement.

Please go to the chart expression, expand the expression and under background color just add below code. Here I have change Downgrade = Red; Opportunity Type = Green;Different Mill = Blue;Ok = Yellow.

Hope this help you.

Regards.

=if(AllocTransfOrigContribEurTon>AllocTransfDestContribEurTon, RGB(255,0,0),

    IF((AllocTransfDestBusinessTp='OPPORTUNIT' and AllocTransfOrigBusinessTp<>'OPPORTUNIT') OR (AllocTransfDestBusinessTp<>'OPPORTUNIT' and AllocTransfOrigBusinessTp='OPPORTUNIT'), RGB(0,255,0),

        IF(AllocTransfOrigMillCd<>AllocTransfDestMillCd, RGB(0,0,255),

        RGB(255,0,255))))

Digvijay_Singh

You may try something like this -

Capture.PNG

ogster1974
Partner - Master II
Partner - Master II

If you are using qlik Sense from sept version

onwards you have the ability to custom colour your master dimensions or measures.

Then when applying in your chart set library colours to on.

I would do this.

Anonymous
Not applicable
Author

Thank you Andy. Unfortunately i'm using a previous version...

Anonymous
Not applicable
Author

Hi Akshaya, thanks for your help.

I've tried adding this expressions under the chart' "color and legend" tab but it didn't work... I'm not sure if that's where you mean when you say "expand the expression and under background". Is it?

Thank you!