How to colour bars based on if the median is above or below threshould

Hi @alfa,

Thank you for posting

Currently, Amazon QuickSight does not support conditional formatting for bar charts to color bars based on threshold conditions. Conditional formatting is only available for specific visual types including gauge charts, KPIs, pivot tables, and tables.
However, there is a workaround solution you can implement. You can create separate calculated fields for each color condition you want to display. For example:

  • Create a “Green” calculated field using ifelse logic that returns the value when above threshold, otherwise returns 0
  • Create a “Red” calculated field using ifelse logic that returns the value when below threshold, otherwise returns 0

Then add these calculated fields to your visualization and select a stacked bar chart format.
You would hide the legends and manually assign the appropriate colors to each calculated field.
This approach effectively creates the visual appearance of bars changing color based on threshold conditions.

Another approach mentioned in the community involves creating a calculated column named “Threshold” that defines different segments of colors, then bringing that field into the Group/Color section of the field well.
You can then manually assign specific colors to each segment in the chart settings.

Please find link to different documentations 1 2 3 4 5

Regards,
Demola

1 Like