Color Formatting on Directionality
Hi Community, Thanks in advance for your help!
I'm trying to highlight directionality of referrer's volumes. I want to compare to each referrer's prior month, not to a total or to an absolute value.
For example, we can see that Jacob dropped off in April. We can see that Bob and Smith are trending upwards. These insights can be gained easily with the colors in the chart.
This is easy to accomplish in Excel, but I can't make it happen in Domo.
Perhaps a table isn't the best way to communicate this, but it's what we've always used.
Can you help me color code a table based on trends per referrer? Do you have other ideas for how to best communicate this metric?
✅Did this solve your problem? Accept it as a solution!
❤️Did you love this answer? Mark it as "Awesome"!
👍Do you agree with this process? Click "Agree"!
Best Answers
-
One way to do it might be to organized columns: Referer, January, February, March, April, May….
Create calculated fields for month to month changes. Such asCASE
WHEN `February` > `January` THEN 1
WHEN `February` < `January` THEN -1
ELSE 0
ENDAnd create similar calculations fields for every month pair. Then set up conditional formatting rules such as
Condition: Feb_vs_Jan = 1 (increase)
Format: Set the background color to a shade of green.
Condition: Feb_vs_Jan = -1 (decrease)
Format: Set the background color to a shade of red.
Condition: Feb_vs_Jan = 0 (no change)
Format: Set the background color to yellow or any neutral color.
(Obviously you could do this with month values as integers as well.)** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0 -
Short answer: there's not really an easy way to do this.
A) HTML format each column
You can use HTML coding in an HTML table to hard code formatting like this. If you have a wide data structure, each month's formula could look something like this:
CONCAT('<div style=color:#000000>',
Case
whenFebruary
=January
then ''
whenFebruary
>January
then '<span style=color:#0072B2>▴</span>'
whenFebruary
<January
then '<span style=color:#D55E00>▾</span>'
END,February
,
'</div>')I tend to like icons over full cell shading, which I think overpowers the data, but you can also apply background colors using HTML:
This is super manual, and to fully replicate your example, the logic would get pretty long to be able to have the first increase = orange, the second = yellow and so on. Not to mention you need a separate BM for every column.
If your data is long, you could do something similar using an ETL or period-over-period BeastMode to figure out if the prior month was less or more than the current month.
B) Flex Table
If you data is in long format, a Flex Table can sketch a plot for each referrer, which gets at your aim of being able to quickly see trends. Pros: no BeastModes needed and works out of the box. Cons: kind of ugly out of the box, and not enough ways to customize, IMO:
C) Multi line
If you really only have 5 referrers, nothing really beats a line chart for seeing trends over time, both inter- and intra-referrer:
D) Norm your values
If your primary concern is seeing the trend since January, 0 out your values at January, and make them "distance from January". Color code on that.
Please 💡/💖/👍/😊 this post if you read it and found it helpful.
Please accept the answer if it solved your problem.
0
Answers
-
One way to do it might be to organized columns: Referer, January, February, March, April, May….
Create calculated fields for month to month changes. Such asCASE
WHEN `February` > `January` THEN 1
WHEN `February` < `January` THEN -1
ELSE 0
ENDAnd create similar calculations fields for every month pair. Then set up conditional formatting rules such as
Condition: Feb_vs_Jan = 1 (increase)
Format: Set the background color to a shade of green.
Condition: Feb_vs_Jan = -1 (decrease)
Format: Set the background color to a shade of red.
Condition: Feb_vs_Jan = 0 (no change)
Format: Set the background color to yellow or any neutral color.
(Obviously you could do this with month values as integers as well.)** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0 -
Short answer: there's not really an easy way to do this.
A) HTML format each column
You can use HTML coding in an HTML table to hard code formatting like this. If you have a wide data structure, each month's formula could look something like this:
CONCAT('<div style=color:#000000>',
Case
whenFebruary
=January
then ''
whenFebruary
>January
then '<span style=color:#0072B2>▴</span>'
whenFebruary
<January
then '<span style=color:#D55E00>▾</span>'
END,February
,
'</div>')I tend to like icons over full cell shading, which I think overpowers the data, but you can also apply background colors using HTML:
This is super manual, and to fully replicate your example, the logic would get pretty long to be able to have the first increase = orange, the second = yellow and so on. Not to mention you need a separate BM for every column.
If your data is long, you could do something similar using an ETL or period-over-period BeastMode to figure out if the prior month was less or more than the current month.
B) Flex Table
If you data is in long format, a Flex Table can sketch a plot for each referrer, which gets at your aim of being able to quickly see trends. Pros: no BeastModes needed and works out of the box. Cons: kind of ugly out of the box, and not enough ways to customize, IMO:
C) Multi line
If you really only have 5 referrers, nothing really beats a line chart for seeing trends over time, both inter- and intra-referrer:
D) Norm your values
If your primary concern is seeing the trend since January, 0 out your values at January, and make them "distance from January". Color code on that.
Please 💡/💖/👍/😊 this post if you read it and found it helpful.
Please accept the answer if it solved your problem.
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 101 SQL DataFlows
- 622 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 748 Beast Mode
- 59 App Studio
- 41 Variables
- 686 Automate
- 176 Apps
- 453 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 396 Distribute
- 113 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 125 Manage
- 122 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 109 Community Announcements
- 4.8K Archive