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.
“There is a superhero in all of us, we just need the courage to put on the cape.” -Superman0
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
“There is a superhero in all of us, we just need the courage to put on the cape.” -Superman0 -
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.
“There is a superhero in all of us, we just need the courage to put on the cape.” -Superman0 -
Perfect, thanks!
0
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 292 Workbench
- 4 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 95 SQL DataFlows
- 602 Datasets
- 2.1K Magic ETL
- 3.7K Visualize
- 2.4K Charting
- 695 Beast Mode
- 43 App Studio
- 39 Variables
- 658 Automate
- 170 Apps
- 441 APIs & Domo Developer
- 42 Workflows
- 5 DomoAI
- 32 Predict
- 12 Jupyter Workspaces
- 20 R & Python Tiles
- 386 Distribute
- 111 Domo Everywhere
- 269 Scheduled Reports
- 6 Software Integrations
- 113 Manage
- 110 Governance & Security
- 8 Domo University
- 30 Product Releases
- Community Forums
- 39 Getting Started
- 29 Community Member Introductions
- 98 Community Announcements
- Domo Community Gallery
- 4.8K Archive