Conditional formatting
Hello Members, I have this unique situation where I need to show both Actuals and Plan bars ( preferred). But if my Actuals are less than 25 % of the Plan ( which is true in this screenshot ) , I want to show Actuals bar as red color.. I am open to switch to different chart but at the end I want Actuals to be shown in red if it is less than 25% of Plan.
Thank You!
Best Answers
-
1) i would recommend a different visualization. consider the Bullet Chart which was designed to show target vs. actuals. by having data spread across two axis you force users to compare something in a way that may not be intuitive.
By stacking Actuals and Plan into the same column of your data you've made it slightly more difficult to use the bullet chart and impossible to compare Actuals vs. Plan without using window function in your current chart type.
SOLUTION. build beast modes for the plan and actuals
sum( case when `version` = 'Plan' then `Amount` END sum( case when `version` = 'Actuals' then `Amount` END
Now you have two separate metrics which you could use in a bullet chart provided that you DO NOT put version on the X Axis.
By using this approach you could also build a beast mode that compares sum(...actuals..) vs. sum(...plan..)
case when sum( case when `version` = 'Plan' then `Amount` END ) >= sum( case when `version` = 'Actuals' then `Amount` END then 'Red' else 'Green' )
Note, I generally don't recommend wrapping aggregate functions, SUM() in inside a CASE statement. It usually doesn't work as expected, so i would be unsurprised if it didn't work in the conditional formatting context.
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"2 -
Thanks all.
0
Answers
-
You can do this very easily with the color rules. In the Chart Properties, click on Colors and then create a rule based on y-axis field that if the value is less than 25 then color it read.
You can read more about color rules here: https://knowledge.domo.com/Visualize/Adding_Cards_to_Domo/KPI_Cards/KPI_Card_Building_Part_2%3A_The_Analyzer/Setting_Color_Rules_for_a_Chart
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.1 -
Hello Mark, Thanks for the reply. But I think i was looking for something else.. By using color rules like show red if value is below x is simple as you said.. Here I am looking for way to show first bar ( Actuals ) red if it is less than 25 % of second bar ( Plans )
0 -
1) i would recommend a different visualization. consider the Bullet Chart which was designed to show target vs. actuals. by having data spread across two axis you force users to compare something in a way that may not be intuitive.
By stacking Actuals and Plan into the same column of your data you've made it slightly more difficult to use the bullet chart and impossible to compare Actuals vs. Plan without using window function in your current chart type.
SOLUTION. build beast modes for the plan and actuals
sum( case when `version` = 'Plan' then `Amount` END sum( case when `version` = 'Actuals' then `Amount` END
Now you have two separate metrics which you could use in a bullet chart provided that you DO NOT put version on the X Axis.
By using this approach you could also build a beast mode that compares sum(...actuals..) vs. sum(...plan..)
case when sum( case when `version` = 'Plan' then `Amount` END ) >= sum( case when `version` = 'Actuals' then `Amount` END then 'Red' else 'Green' )
Note, I generally don't recommend wrapping aggregate functions, SUM() in inside a CASE statement. It usually doesn't work as expected, so i would be unsurprised if it didn't work in the conditional formatting context.
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"2 -
@faisalnjit I came across this KB article that might work for you.
Read the section called "controlling chart colors using beast mode". You might be able to create a calculation that determines what 25% of your other number is and enter that as a goal and then set a color if it is below the goal.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.0 -
Thanks all.
0
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 294 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 97 SQL DataFlows
- 607 Datasets
- 2.1K Magic ETL
- 3.8K Visualize
- 2.4K Charting
- 707 Beast Mode
- 49 App Studio
- 39 Variables
- 667 Automate
- 170 Apps
- 446 APIs & Domo Developer
- 44 Workflows
- 7 DomoAI
- 33 Predict
- 13 Jupyter Workspaces
- 20 R & Python Tiles
- 391 Distribute
- 111 Domo Everywhere
- 274 Scheduled Reports
- 6 Software Integrations
- 115 Manage
- 112 Governance & Security
- Domo Community Gallery
- 31 Product Releases
- 9 Domo University
- 5.3K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 103 Community Announcements
- 4.8K Archive