Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Pie Chart Colour for Maximum Value

Hi

I have a pie chart which shows Sum(Revenue) by Sales Channel.

What I would like to show is for the slice with the largest Sum(Revenue) to be coloured in Green, whilst all other slices to be in grey.

May I know what kind of expression should I be using? I've tried colour mix and IF but they're not working.

Thanks in advance!

1 Solution

Accepted Solutions
Lech_Miszkiewicz
Honored Contributor III

Re: Pie Chart Colour for Maximum Value

Hi

go to

  • your pie chart properties
  • colours and legend
    • toggle from "auto" to "custom"
    • choose by expression
    • put expression: If(Rank(aggr(sum(Revenue),[Sales Channel]))=1,RGB(0,255,0), RGB(150,150,150))
    • modify rgb colors according to your colour needs

thats it

cheers

Lech

cheers Lech
When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution.
Please LIKE threads if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem.
5 Replies
Lech_Miszkiewicz
Honored Contributor III

Re: Pie Chart Colour for Maximum Value

Hi

go to

  • your pie chart properties
  • colours and legend
    • toggle from "auto" to "custom"
    • choose by expression
    • put expression: If(Rank(aggr(sum(Revenue),[Sales Channel]))=1,RGB(0,255,0), RGB(150,150,150))
    • modify rgb colors according to your colour needs

thats it

cheers

Lech

cheers Lech
When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution.
Please LIKE threads if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem.
Not applicable

Re: Pie Chart Colour for Maximum Value

Cheers Lech

Lech_Miszkiewicz
Honored Contributor III

Re: Pie Chart Colour for Maximum Value

does it work for you mate?

cheers Lech
When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution.
Please LIKE threads if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem.
Not applicable

Re: Pie Chart Colour for Maximum Value

Works like a charm.

Lech_Miszkiewicz
Honored Contributor III

Re: Pie Chart Colour for Maximum Value

the only thing is that if there are null values in your dimension they will get a default "grey-ish" color.  I hope it is not a problem. Ultimately you may want to disable null values in dimension settings.

cheers

Lech

cheers Lech
When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution.
Please LIKE threads if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem.
Community Browser