Color Rule on Grouped Bar

Say you have a grouped bar
X = Date/Month
Y = Amount
Bar 1 = Target Amount
Bar 2 = Current Amount
Each month has a different Target Amount. What I want it when Current Amount >= Target Amount then Color 1 else Color 2.
Thoughts?
Best Answer
-
Color rules can only be applied based on the field name or the value of that field. They are not able to look at values from other fields.
You could try displaying just the Variance. Created a beastmode
`Current Amount`/`Target Amount`
Then your graph would be a percentage of their target amount, the goal (or scale marker) would be set at 1 and you could assign color rules based on >=1 or <1.
I think you should even be able to have the Target amount as a bar too, if you can split the y axis. Have the left axis be the target amount and the right axis be the percentage.
0
Answers
-
You could create a beastmode to split out the current amount into an above target field and a below target field. then add those to your graph instead of the current amount field:
Above Target
case when `Current Amount`>=`Target Amount` then `Current Amount` end
Below Target
case when `Current Amount`<`Target Amount` then `Current Amount` end
You would then apply a color rule for above target and one for below target
0 -
Well i got the two beastmodes to work, but after dropping them into the axis, the bars would become separated depending on which beastmode was true at the time.
Ideally, it'd be nice to have color rules that reference other fields rather than static values.
0 -
Color rules can only be applied based on the field name or the value of that field. They are not able to look at values from other fields.
You could try displaying just the Variance. Created a beastmode
`Current Amount`/`Target Amount`
Then your graph would be a percentage of their target amount, the goal (or scale marker) would be set at 1 and you could assign color rules based on >=1 or <1.
I think you should even be able to have the Target amount as a bar too, if you can split the y axis. Have the left axis be the target amount and the right axis be the percentage.
0 -
Perfect, thanks!
0
Categories
- All Categories
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 311 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3.8K Transform
- 656 Datasets
- 115 SQL DataFlows
- 2.2K Magic ETL
- 811 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 80 App Studio
- 45 Variables
- 771 Automate
- 190 Apps
- 481 APIs & Domo Developer
- 77 Workflows
- 23 Code Engine
- 36 AI and Machine Learning
- 19 AI Chat
- AI Playground
- AI Projects and Models
- 17 Jupyter Workspaces
- 410 Distribute
- 120 Domo Everywhere
- 280 Scheduled Reports
- 10 Software Integrations
- 142 Manage
- 138 Governance & Security
- 8 Domo Community Gallery
- 48 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 114 Community Announcements
- 4.8K Archive