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 to any 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 to any 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
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 737 Beast Mode
- 55 App Studio
- 40 Variables
- 684 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 46 Workflows
- 10 DomoAI
- 35 Predict
- 14 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 123 Manage
- 120 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive