Can I change the column colors based on the value of the column name in a pivot table?

I am trying a make a QuickSight Pivot Table with similar color formatting as the image below. I have the timestamp values in a calculated field (string) and want to set the column colors based on the time interval value. Is that doable or not a feature yet?

ConditionalFormatting

Hi @hcorbett7 - Here’s how I was able to make this work. In my example I’m using daily granularity, versus hourly that you have, but the principle is the same.

  1. Create a parameter to hold the timestamp value you’re comparing against. In my case that looks like this

  2. Create a calculated field (I named it DateDiff) to check the value in the parameter against your datetime field. In my case that looks like ifelse(Date = ${DateParam}, 2, Date > ${DateParam}, 1, 0)
    If the Date (day granularity) is equal to the value in the parameter we return 2. If it’s not, then if it’s greater we return 1, else 0.

  3. Go in the pivot table hover over the top-right column and click on “Conditional formatting”
    Screenshot 2023-06-12 at 10.57.36

  4. Select the column (metric) from the drop down and add the conditions


    Screenshot 2023-06-12 at 11.02.37

  5. Final result
    Screenshot 2023-06-12 at 11.03.07

If this helps please mark the answer as the solution. If you get stuck happy to help.

2 Likes

Hi @hcorbett7 ,

I’m marking response from @eperts as the solution to your query.
Please let us know if you have further questions.

Regards,
Arun Santhosh

1 Like