SQL DataFlows

SQL DataFlows

Color Coding or conditional formatting in DOMO?

Member
edited May 2023 in SQL DataFlows

I am trying to make a scorecard for budget…etc… Let's say our budget in Jan was $14,418,053 and are actuals were below that. How could I turn that budget red? and vice versa if actuals were above budget it would be green? Is this possible in DOMO yet or are there work arounds.

Thanks,

Garrett

Welcome!

It looks like you're new here. Members get access to exclusive content, events, rewards, and more. Sign in or register to get started.
Sign In

Best Answers

  • Answer ✓

    If you are using a mega table, you can create beast modes that color the numbers like this:

    1. CASE WHEN budget > actual then concat('<div style="color: #ff0000">',`budget`,'</div>')
    2.  
    3. else
    4.  
    5. concat('<div style="color: #00ff00">',`budget`,'</div>')
    6.  
    7. end

    This would turn the budget red if it is higher, otherwise it will be green.

    **Check out my Domo Tips & Tricks Videos

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.
  • Answer ✓

    Try switching to the HTML table chart type and see if that works.

    **Check out my Domo Tips & Tricks Videos

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.
  • Answer ✓

    You can construct the format through some elaborate beast mode syntax, but it will still be viewed as text. If you search the community for beast mode formatting, you should see some examples. You could add a round function to eliminate pennies very easily, but the commas and $ signs require an elaborate beast mode.

    **Check out my Domo Tips & Tricks Videos

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.
  • Coach
    Answer ✓

    Here are a few posts on beast modes that may help you:

    Domo IDEAs Conference - Beast Modes - Number Formatting

    Domo Idea Exchange - Beast Modes - Abbreviated Summary Number

    Domo IDEAs Conference - Beast Modes - Conditional Formatting

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • Coach
    Answer ✓

    You can replace the FLOOR(SUM(`random_number`)) on line 11 in the example with the beast mode that will format the value with commas. You can refer to the Number Formatting link I sent earlier.

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**

Answers

  • Answer ✓

    If you are using a mega table, you can create beast modes that color the numbers like this:

    1. CASE WHEN budget > actual then concat('<div style="color: #ff0000">',`budget`,'</div>')
    2.  
    3. else
    4.  
    5. concat('<div style="color: #00ff00">',`budget`,'</div>')
    6.  
    7. end

    This would turn the budget red if it is higher, otherwise it will be green.

    **Check out my Domo Tips & Tricks Videos

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.
  • Member

    Thank you for this. This looks like this will be able to help. In the beastmode what do I need to change? It seems to be brining the budget over but not the color.

    CASE WHEN SUM(Budget) > SUM(Amount) then concat('',SUM(Budget),'')

    else

    concat('',SUM(Budget),'')

    end

  • Member
  • Answer ✓

    Try switching to the HTML table chart type and see if that works.

    **Check out my Domo Tips & Tricks Videos

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.
  • Member

    Great that worked! One last thing is it will not format to currency I am assuming because it comes in as a text. Is there work around this or is this as detailed as DOMO's beastmodes can get

  • Answer ✓

    You can construct the format through some elaborate beast mode syntax, but it will still be viewed as text. If you search the community for beast mode formatting, you should see some examples. You could add a round function to eliminate pennies very easily, but the commas and $ signs require an elaborate beast mode.

    **Check out my Domo Tips & Tricks Videos

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.
  • Coach
    Answer ✓

    Here are a few posts on beast modes that may help you:

    Domo IDEAs Conference - Beast Modes - Number Formatting

    Domo Idea Exchange - Beast Modes - Abbreviated Summary Number

    Domo IDEAs Conference - Beast Modes - Conditional Formatting

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • Member

    Thanks @GrantSmith !

    This beastmode helped with removing decimals and still kept the color conditions active. What is the correct way to format this beastmode to be able to have commas in the value?

    Thanks

  • Coach
    Answer ✓

    You can replace the FLOOR(SUM(`random_number`)) on line 11 in the example with the beast mode that will format the value with commas. You can refer to the Number Formatting link I sent earlier.

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • Member

    Worked great! Thank y'all for the help!

  • @gbrown Glad to hear it! If you could accept any answers that helped solved your problem so others can easily find the answers I'd appreciate it!

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • Member
    edited March 2024

    Hello,
    Can I use the HTML syntax to put colors in a pivot table with beastmode?
    I'm trying to do a formula like:

    CASE
    WHEN AVG(SLA Calculation) >= 0.9 THEN concat('<div style="color: #ff0000">',AVG(SLA Calculation),'</div>')
    ELSE concat('<div style="color: #00ff00">',AVG(SLA Calculation),'</div>')
    END

Welcome!

It looks like you're new here. Members get access to exclusive content, events, rewards, and more. Sign in or register to get started.
Sign In