6 Replies Latest reply on Jan 8, 2019 1:12 AM by amar savale

# Conditional color on stacked bar chart

Hi all,

Here I am facing an issue like, I have created stacked bar chart by sub-category wise as I shown in below image. Here I have created stacked bar chart by using 4 measures of avg (4 regions of avg(sales)) and showing total avg(sales) on other axis. I have applied color condition for total avg sales (

IF AVG([Sales])<=500 THEN "Red" ELSEIF AVG([Sales])>500 AND AVG([Sales])<1000 THEN "Yellow"

ELSEIF AVG([Sales])>=1000 THEN "Green" END) on circle showing as 3 ranges of sales (green,yellow,red). Here I wanted to apply the same color condition on each measure in stacked bar by showing the 3 color ranges (green,yellow,red). I have tried in many ways but couldn't able to find any solution for that.

Please find the attached sample workbook.

Regards,

Suresh

• ###### 1. Re: Conditional color on stacked bar chart

I think you want something like this :

Your West calculation was wrong so I fixed that, but I did it without using the special calculated fields (which is better)

• ###### 2. Re: Conditional color on stacked bar chart

Hi Chris,

As you shown the image is correct and I'm looking for the same but in my case I have 4 different measures and don't have any relevant dimension is for that. So without moving region in to the color marks card need to apply color condition on each region measure which I took 4 separated measures in sample workbook.

I hope you have understood my issue.

• ###### 3. Re: Conditional color on stacked bar chart

Hi,

Please find the below attachment it show's conditional coloring as per subcategory wise AVG(Sales) as well as Conditional coloring as per region wise subcategory wise conditional coloring.

marked as Correct or helpful if it is working.

Thanks,

Amar D. Savale

• ###### 4. Re: Conditional color on stacked bar chart

I understand now, but I can't find a way to do it

• ###### 5. Re: Conditional color on stacked bar chart

Hi Amar,

The way you did is correct but I need it in stacked bar chart (instead of side by side bar) by using 4 regions of AVG and need to apply the same conditional color on stacked bar.

Is it possible to do this?

• ###### 6. Re: Conditional color on stacked bar chart

Hi,

Please find the attachment marked as Correct or Helpful if it is working,

Thanks,

Amar D. Savale