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?
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.
-
Create a parameter to hold the timestamp value you’re comparing against. In my case that looks like this
-
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. -
Go in the pivot table hover over the top-right column and click on “Conditional formatting”
-
Select the column (metric) from the drop down and add the conditions
-
Final result
If this helps please mark the answer as the solution. If you get stuck happy to help.
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