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
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive