Arrow Trend an Color Condition Format

Hi, I'm new to Domo!
I’ve successfully applied basic color formatting in the chart properties of a bar chart, but I’m having trouble with more complex color formatting. Specifically, I want to format colors based on conditions like comparing current percentages to values from the previous year. I couldn’t find it in Analyzer and there's no relevant tutorial on YouTube.
I’m also planning to create a table view that includes trend arrows and color formatting. Any tips or resources on these topics would be greatly appreciated!
Thank you so much.
*PY - Previous Year
Best Answer
-
This thread may be relevant to you as far as the colored directional arrow.
I made this video a while back about the color options in Domo. It may be helpful to you.
**Check out my Domo Tips & Tricks Videos
**Make sure toany users posts that helped you.
**Please mark as accepted the ones who solved your issue.2
Answers
-
This thread may be relevant to you as far as the colored directional arrow.
I made this video a while back about the color options in Domo. It may be helpful to you.
**Check out my Domo Tips & Tricks Videos
**Make sure toany users posts that helped you.
**Please mark as accepted the ones who solved your issue.2 -
You may want to look into Flex Tables as an option, but usually what I end up doing in these situations is use an HTML Table so that I can customize the Arrows, Colors, Rules, etc.
Below is just a basic example, but you can see how the beast mode can get very complex with even simple examples:
/*
Growth Indicator
*/
CONCAT(
'<div style="" title="% Change from Previous Row">'
, CASE
WHEN
(
/*
VIN Count Growth
(current value - prior value) / prior value
*/
(
/* Sum VIN Count */
SUM(`VIN count`)
-
/* Lag VIN Count */
lag(
/* Sum VIN Count */
SUM(`VIN count`)
) over (order by `Date`)
)
/
/* Lag VIN Count */
lag(
/* Sum VIN Count */
SUM(`VIN count`)
) over (order by `Date`)
) > 0
THEN CONCAT(
'<span style="color:MediumSeaGreen;">'
,'<img height="10px" src="https://upload.wikimedia.org/wikipedia/commons/7/73/Basic_triangle.svg"> '
, /*
String VIN Count Growth
*/
CONCAT(
ROUND(
(
/*
VIN Count Growth
(current value - prior value) / prior value
*/
(
/* Sum VIN Count */
SUM(`VIN count`)
-
/* Lag VIN Count */
lag(
/* Sum VIN Count */
SUM(`VIN count`)
) over (order by `Date`)
)
/
/* Lag VIN Count */
lag(
/* Sum VIN Count */
SUM(`VIN count`)
) over (order by `Date`)
) * 100
, 2)
, '%')
,'</span>'
)
WHEN
(
/*
VIN Count Growth
(current value - prior value) / prior value
*/
(
/* Sum VIN Count */
SUM(`VIN count`)
-
/* Lag VIN Count */
lag(
/* Sum VIN Count */
SUM(`VIN count`)
) over (order by `Date`)
)
/
/* Lag VIN Count */
lag(
/* Sum VIN Count */
SUM(`VIN count`)
) over (order by `Date`)
) < 0
THEN CONCAT(
'<span style="color:red;" title="">'
, '<img height="10px" src="https://upload.wikimedia.org/wikipedia/commons/e/ed/Decrease2.svg">'
, /*
String VIN Count Growth
*/
CONCAT(
ROUND(
(
/*
VIN Count Growth
(current value - prior value) / prior value
*/
(
/* Sum VIN Count */
SUM(`VIN count`)
-
/* Lag VIN Count */
lag(
/* Sum VIN Count */
SUM(`VIN count`)
) over (order by `Date`)
)
/
/* Lag VIN Count */
lag(
/* Sum VIN Count */
SUM(`VIN count`)
) over (order by `Date`)
) * 100
, 2)
, '%')
, '</span>'
)
ELSE '<span style="color:Gray;">-</span>'
END
, '</div>'
)3 -
Wow, there's some neat stuff going on in this post. We need @Eddie Small to get these three on a talkabout. (Sorry, I made up that word because it's late on a Friday and I can't remember what Eddie calls those neat online get-togethers.)
** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **1 -
Thank you so much, @MarkSnodgrass and @ggenovese!
0
Categories
- All Categories
- Product Ideas
- 2.1K Ideas Exchange
- Data Connections
- 1.3K Connectors
- 309 Workbench
- 17 Cloud Integrations
- Data & ETL
- 2.3K Magic ETL
- 120 SQL DataFlows
- 667 Datasets
- Visualize & Apps
- 90 App Studio
- 198 Pro-code Components
- 2.6K Charting & Analyzer
- 874 Calculations & Variables (Beast Mode)
- AI & Data science
- 23 Domo AI & AI Chat
- 4 Managing AI
- 18 Jupyter Workspaces
- Automate
- 122 Workflows
- Alerts
- Distribute
- 118 Domo Everywhere
- 284 Reporting
- Manage
- 146 Governance & Security
- 489 APIs
- 11 Add-ins & Plugins
- 13 Domo Community Gallery
- 49 Product Releases
- 13 Domo University
- Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 118 Community Announcements
- 5K Archive