HTML conditional color format as percentage of goal

I have a a domo dashboard that is in the bullet format. the data I have is listed in into 3 categories: 'Current', 'Trending', and 'Goal'. 

I want to create conditional color formatting that turns the current section red when it is below the goal, yellow when it has reached the goal, and green when it has surpassed the goal. I would like to trending section to use the same format, but use different shades of green, yellow, and red.

 

Thanks,

 

Jeff

 

Comments

  • One thing you could do would be to create a BeastMode to check the current value against the goal. 

     

    Something like this:

    CASE WHEN `Current` < `Goal` THEN 1
    WHEN `Current` = `Goal` THEN 2
    WHEN `Current` > `Goal` THEN 3
    END

    Then you could use the new BeastMode field in your color options like so:

    Screen Shot 2018-02-05 at 5.52.57 PM.png

    From there you could repeat the excercise for trending and assign new colors. (Make sure to uncheck the 'Apply format to table row' if you don't want the entire row to be highlighted the specified color)

     

    Hope this helps. Let me know if you have any other questions.

     

    Sincerely,

    ValiantSpur

     

    **Please mark "Accept as Solution" if this post solves your problem
    **Say "Thanks" by clicking the "heart" in the post that helped you.

  • Thanks for the response.I tried using your solution and I found that the coloring did not change the color of the 'current', but rather it created color rules for the new beast mode formula. Is there a way to make the color of 'current' change according to its position relative to the goal? 

  • That's a nice idea.  Make sure to add it to the Ideas Exchange.

    More generally, colors changing once they meet a condition is something Domo is working on, but could be better.  Conditional formatting is part of new table cards, so you could transition card types if you want to take advantage of that.

    There may be another approach you'd be interested in as well.  We use simple guage cards for a similar purpose, sales trend to sales quota and current sales to sales quota.  We set up those figures as ratios, like 65% or 114% to goal, and use the guage range color options to indicate progress to goal (like, green over 100%). Then in the card summary number we create a multiple number beast mode to show all values, not just the ratio, for further detail.  This type of card is one of the first cards on every sales page since it's so simple and effective.

    Aaron
    MajorDomo @ Merit Medical

    **Say "Thanks" by clicking the heart in the post that helped you.
    **Please mark the post that solves your problem by clicking on "Accept as Solution"