How to colour/group percentage difference using custom aggregation field

I have a dataset which i am using for learning. It is fruit production for UK, France, and Spain, from 2014-2018. I am focusing on UK, on the fruit “Pears”. I have a chart which i want to show the percentage difference for each year in production of Pears.

It looks like this:

It is quite simple, but i want to colour anything above 0% green, and anything below 0% red. So it colours whether it was a positive or negative difference.

The only problem is that i can’t use a calculated field i have created to group them.

The Year field is just 2014-2018, but the value% is the weight of fruits (in this case pears), but as a percentage. I have used 2014 as a baseline, so the calculated field was:

(sum(Value) / 25880) - 1

this is dividing 2014 pears value (25,880 tonnes) by itself = 1, -1, then i turn this into a percentage in my chart. The others will then use the same calculation, to determine whether it was an increase or decrease from 2014. I just want a way to colour the decrease in red, and the increase in greed.

I tried using this field to group them, which would work, however i can’t use aggregated fields in the group dimension?
image

Hi Harvey,

I believe you are looking to conditionally format negative values in bar chart measure field.

Conditional formatting is available on the following visuals: (Gauge charts, KPIs,Pivot tables, Tables, Filled Maps) Conditional formatting on visual types in QuickSight - Amazon QuickSight

As alternate solution, you may consider table visual with data bar setting to show negative values as red. It is explain in following link Adding data bars to tables in QuickSight - Amazon QuickSight

I will also be happy to learn if some community member has a more creative way of addressing this requirement.

Regards,
Anwar Ali