Pivot Table conditional format

Hello, I have a pivot table card where I need to compare if the value is greater than the goal, and paint that field in red.

How is this possible? I can only compare it to a single value, but it is not the same over the timeframe I have.




  • I'm not sure if you've tried this approach or if it even works on pivot tables but you can try to create a BeastMode with html styling elements.Β 



    CASE `salesperson`
    when 'Bob' then CONCAT('<span style="color:red">',`salesperson`,'</span>')
    else `salesperson`

    Here is some documentation from the Knowledge Base: https://knowledge.domo.com/Visualize/Adding_Cards_to_Domo/KPI_Cards/Transforming_Data_Using_Beast_Mode/Sample_Beast_Mode_Calculations%3A_Card_Element_Transforms. Let me know if you get something working for you!


  • A similar, but slightly different approach to Cartergan's suggestion, is to use Beast Mode for the comparison, but still rely on the UI for your color application.


    The Best Mode would be something to the effect of...


    Beast Mode: `To-Goal`

    WHEN IFNULL(`Actual`, 0) > `Goal` THEN 'Exceeded Goal'
    WHEN IFNULL(`Actual`, 0) = `Goal` THEN 'Attained Goal'
    WHEN IFNULL(`Actual`, 0) < `Goal` THEN 'Missed Goal'
    ELSE 'Error' END

    Then you can apply color logic based on the value of `To-Goal`. Depending on the chart type, this does require that you have the `To-Goal` field in the chart, so it may or may not meet your needs. Just giving you an alternative approach in case you don't want to deal with the inline HTML code.

This discussion has been closed.