Color Formatting Pivot table

I have a pivot table that shows the sales by location for each month. I need to highlight the maximum sales month for each location. I have used  Html conditioning formatting on a single column, but since this is a row-level comparison I am not sure how it can be done. 

 

 

Here's what I have 

table_not_formatted.jpg

 

Here's the desired output 

table_formatted.jpg

 

 

I am comfortable writing SQL so open to dataflow transformation ideas as well. 

Comments

  • GrantSmith
    GrantSmith Indiana 🔴

    Hi @domo_card 

     

    Currently the Pivot table card doesn't support HTML markup like the normal or mega tables do.

     

    You could sort of create your own pivot table within a MySQL or Magic ETL however you have to maintain the columns yourself and is a prohibitive hassle to attempt to keep it up to date (especially with dates) so it's not really a viable option. Not to metion you also lose the ability for filters to affect your underlying data in the card.

  • Hi @domo_card 

     

    I had a similar dilema recently and I think this may be an acceptable solution for you as well. This solution uses the Heatmap chart type and a calculated field. *Note use the Heatmap chart under Other Chart, NOT the Heatmap table.

     

    Create a calculated field comparing the max partitioned value to the value.

    Example: CASE WHEN `Value` = MAX(MAX(`Value`)) OVER (PARTITION BY `Date`) THEN 1 ELSE 0 END

     

    Set the following dimensions:

    Category 1 - Date

    Category 2 - Location

    Value - Calculated Field *Created above

    Tooltip - Value *Note to enable the tooltip pill select Tooltip next to Chart Types within the top Palette selector.

     

    Set range settings:

    Range 1 Minimal Value - 1

    Range 1 Maximum Value - 1

    Set desired coloring.

     

    Set data label settings:

    Text - %_Tooltip1

     

    Using the heatmapping chart, calculated field, and ranges you can customize the coloring of the chart while displaying the standard values.

     

    Please reach out with any questions, concerns, or if i am unclear with the steps.

This discussion has been closed.