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
- Connect
- 1.3K Connectors
- 309 Workbench
- 7 Cloud Amplifier
- 10 Federated
- Transform
- 664 Datasets
- 120 SQL DataFlows
- 2.3K Magic ETL
- 825 Beast Mode
- Visualize
- 2.6K Charting
- 90 App Studio
- 46 Variables
- Automate
- 197 Apps
- 489 APIs & Domo Developer
- 94 Workflows
- 24 Code Engine
- AI and Machine Learning
- 23 AI Chat
- 4 AI Projects and Models
- 18 Jupyter Workspaces
- Distribute
- 119 Domo Everywhere
- 283 Scheduled Reports
- 11 Software Integrations
- Manage
- 145 Governance & Security
- 12 Domo Community Gallery
- 49 Product Releases
- 13 Domo University
- Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 116 Community Announcements
- 5K Archive