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.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 755 Beast Mode
- 61 App Studio
- 41 Variables
- 693 Automate
- 178 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive