Adding custom font colors for a transposed row in a table
I want to label the positive numbers in green and negatives in red but only for the second row. How can this be achieved?
Current chart settings is as shown below
Best Answer
-
So this would require you to use an HTML table, which would mean restructuring your data because transpose isn't an option. But if you're really set on changing the font color instead of the cell color, you can achieve that by using this beast mode.
CASE
WHEN SUM(value) < 0 THEN CONCAT('<p style="color:red;">',SUM(value),'</p>')
ELSE CONCAT('<p style="color:green;">',SUM(value),'</p>')
ENDDavid Cunningham
** Was this post helpful? Click Agree 😀, Like 👍️, or Awesome ❤️ below **
** Did this solve your problem? Accept it as a solution! ✔️**1
Answers
-
Not exactly the same, but you can add rules to the Colors chart properties to shade the cell red. I don't think that you can do the font color there, though. If you uncheck "Apply format to table row" it will only shade the cell, so you will get the same effect (highlighting the negatives), but via shade rather than font color.
0 -
The easiest way to achieve this is to set the negative numbers to show in red, and then use card color rules to set > 0 to show in green. The red negative number setting will override the green.
However, this approach causes the cell to be filled in, just an FYI.
David Cunningham
** Was this post helpful? Click Agree 😀, Like 👍️, or Awesome ❤️ below **
** Did this solve your problem? Accept it as a solution! ✔️**0 -
I have already tried both the approaches, but would prefer the changes to be displayed only for fonts than for cells
0 -
So this would require you to use an HTML table, which would mean restructuring your data because transpose isn't an option. But if you're really set on changing the font color instead of the cell color, you can achieve that by using this beast mode.
CASE
WHEN SUM(value) < 0 THEN CONCAT('<p style="color:red;">',SUM(value),'</p>')
ELSE CONCAT('<p style="color:green;">',SUM(value),'</p>')
ENDDavid Cunningham
** Was this post helpful? Click Agree 😀, Like 👍️, or Awesome ❤️ below **
** Did this solve your problem? Accept it as a solution! ✔️**1
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
- 754 Beast Mode
- 61 App Studio
- 41 Variables
- 693 Automate
- 178 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