KPI Table
Best Answer
-
If Target is a field in your dataset, then you actually don't even need to worry about which row it is. This beast mode will color it based on if the number per month is greater than or less than the target.
CASE WHEN `numberPerMonth` < `target` THEN concat('<div style="background-color:red; color:white; margin:-20px; padding:20px">',SUM(`numberPerMonth`),'</div>') ELSE concat('<div style="background-color:green; color:white; margin:-20px; padding:20px">',SUM(`numberPerMonth`),'</div>') END
You'll need to change the field names to match what the fields are called in your dataset, but this should do what you want.
**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
Answers
-
I would use the HTML table card so that you can construct beast modes that would color the cells based on your different formatting rules. Use the <div> tag to set colors.
Here is an example syntax:
CASE WHEN SUM(`Sales Amount`) < 300000 THEN concat('<div style="background-color:red; color:white; margin:-20px; padding:20px">',SUM(`Sales Amount`),'</div>') ELSE concat('<div style="background-color:green; color:white; margin:-20px; padding:20px">',SUM(`Sales Amount`),'</div>') END
**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 -
Can you help me with the construction of beast mode. My apologies, I am a new Domo user.
1 -
I edited my first comment to include a sample beast mode that would color the cells. If you provide some insight on your fields and rules, I can probably write one specific to your instance.
**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 -
This KB article also links to some helpful references:
https://domohelp.domo.com/hc/en-us/articles/360043429993-Sample-Beast-Mode-Calculations
**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 -
For example, in my KPI, (first row) Volume, target is 1000, for January it is green, if the number per month is less than 1000, then it would be red...
in the second row, if the safety numbers is zero, then green, if more than zero, then red.
I want to understand how shall I apply your formula per row.
My apologies :(
0 -
If Target is a field in your dataset, then you actually don't even need to worry about which row it is. This beast mode will color it based on if the number per month is greater than or less than the target.
CASE WHEN `numberPerMonth` < `target` THEN concat('<div style="background-color:red; color:white; margin:-20px; padding:20px">',SUM(`numberPerMonth`),'</div>') ELSE concat('<div style="background-color:green; color:white; margin:-20px; padding:20px">',SUM(`numberPerMonth`),'</div>') END
You'll need to change the field names to match what the fields are called in your dataset, but this should do what you want.
**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 -
You would need to repeat this for each column, though. Label the Beast Mode January, February, etc. and use the appropriate fields in each beast mode.
**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 -
it colors the whole column not just a particular cell. what I am trying to do it to color it based on the KPI column in which each row has different color rulings per month :(
0 -
My problem was solved already by adding some case to your formula. Another question, how can I put an individual drill path per cell?
0 -
Glad my formula worked for you. You can only drill to one card. You can't drill to different card types based on what you click on if that is what you are trying to do. The field you click on will be part of your filter criteria.
**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 -
@MarkSnodgrass , another concern, can I customize each row wherein, one row is in percentage format, currency and number?
Example:
KPI Result
Compliance 100%
Savings $100
Errors 4.5
0 -
How can I update the card, same time I update and saved the excel file?
i already tried updating the data at the bottom of the card but it's not updating :(
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