Bullet chart color rule

I have a bullet chart showing Sales, COGS, GM and it's corresponding Budget Amount

As you can see, Sales and Cogs are over the budget, and I want to show the bar color to green. Whereas GM is lower than the Budget, I want to show the GM bar to be grey.

How do I achieve this with color rules?

Tagged:

Answers

  • Set a formula based on budget_type with something comparing actual performance against budget.

    CASE 
    WHEN `Actual Amount` >= `Budget Amount` THEN 'Green'
    WHEN `Actual Amount` < `Budget Amount` THEN 'Grey'
    ELSE 'Blue' -- Optional default color if you need one
    END

    Then go to chart properties > color rules and map colors to your formula.

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

  • I created a BeastMode follow your instruction and set the color rule like this

    However, the chart stay the same, no color rule were applied.

  • How about I try explaining this way. Apologies as I make up some quick sample data. I'm going to use quantity, price, calculated total, and a budget per order.

    Let's assume this is my data:

    OrderID

    Product

    Budget_Type

    Quantity

    Price

    OrderDate

    Budget

    1001

    Widget A

    Sales

    5

    25.0

    2025-01-15

    80

    1002

    Widget B

    COGs

    2

    50.0

    2025-01-16

    90

    1003

    Widget A

    Sales

    1

    25.0

    2025-01-17

    35

    1004

    Widget C

    GM

    10

    75.0

    2025-01-18

    600

    1005

    Widget B

    COGs

    3

    50.0

    2025-01-19

    160

    1006

    Widget A

    Sales

    7

    25.0

    2025-01-20

    200

    1007

    Widget C

    GM

    4

    75.0

    2025-01-21

    250

    And this is my color rule:

    If I do a table chart, it might look like this

    And using that same dataset and changing it to a horizonal bar:

    In this example my color rules are

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

  • ArborRose's approach works on most card types, but not on the Bullet Chart. For whatever reason, Bullets won't accept color rules like this. If I were to guess why, it's that the philosophy behind a Bullet Chart is to show progress against targets using the relationship between the bar and the target marker, so a color would be redundant, but it is limiting.

    If you want a pop of color when you meet/don't meet the target, you could use unicode characters in a tool tip (hat tip to ArborRose's fake data):

    Case
    when Price* Quantity >= Budget then '🔵'
    when Price* Quantity < Budget then '❌'
    END

    You can see this highlights a second annoying limitation of Bullets in Domo, in that you can't control what the data labels appear on (Actual Value vs. Target vs. everything), so you end up with redundant marks on the graph.

    If you're willing to ditch the Bullet (I usually do!) another approach is using the Symbol + Stacked Bar:

    To achieve that, I broke up Total into Total (over budget) and Total (under budget):

    If you used the Symbol + graph, make sure to check the option to "Sync Value Scale" in the general properties, which is off by default.

    And to go even farther from your original request, IMO changing the color of the whole bar can be a bit busy. You could take a similar approach, but color-code the budget icon instead, giving you more control over what draws attention on the chart:

    Please 💡/💖/👍/😊 this post if you read it and found it helpful.

    Please accept the answer if it solved your problem.

  • Wow, that's a really clever approach @DavidChurchman. I did not catch that it was a bullet chart vs a horizonal bar.

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

  • @DavidChurchman - I really like this trick. How about maybe point up or down based on budget?

    • Up arrow: ↑ (Unicode: U+2191)
    • Down arrow: ↓ (Unicode: U+2193)

    • Up-pointing triangle: ▲ (Unicode: U+25B2)
    • Down-pointing triangle: ▼ (Unicode: U+25BC)

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

  • @ArborRose Yeah, with arrows like that, you could also make your target 100% transparent and just use the data label as the target (centered data-label from tool-tip, symbols-only data-label):

    Case
    when Price* Quantity >= Budget then '🔹'
    when Price* Quantity < Budget then '🔻'
    END

    Please 💡/💖/👍/😊 this post if you read it and found it helpful.

    Please accept the answer if it solved your problem.