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.5K Connect
- 1.2K Connectors
- 296 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 614 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 729 Beast Mode
- 53 App Studio
- 40 Variables
- 677 Automate
- 173 Apps
- 451 APIs & Domo Developer
- 45 Workflows
- 8 DomoAI
- 34 Predict
- 14 Jupyter Workspaces
- 20 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 121 Manage
- 118 Governance & Security
- Domo Community Gallery
- 32 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive