KPI Table
How do I create something like this in DOMO?
Each row has different conditional formatting rules.
Please help.
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.
**Make sure toany 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
**Make sure toany 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.
**Make sure toany 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
**Make sure toany 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 -
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.
**Make sure toany 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.
**Make sure toany 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
- 11K All Categories
- 5 Private Company Board
- 2 APAC User Group
- 12 Welcome
- 43 Domo News
- 9.9K Using Domo
- 2K Dataflows
- 2.5K Card Building
- 2.2K Ideas Exchange
- 1.2K Connectors
- 349 Workbench
- 267 Domo Best Practices
- 12 Domo Certification
- 474 Domo Developer
- 51 Domo Everywhere
- 111 Apps
- 728 New to Domo
- 85 Dojo
- Domopalooza
- 1.1K 日本支部
- 4 道場-日本支部へようこそ
- 31 お知らせ
- 65 Kowaza
- 303 仲間に相談
- 664 ひらめき共有