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.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 292 Workbench
- 4 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 95 SQL DataFlows
- 602 Datasets
- 2.1K Magic ETL
- 3.7K Visualize
- 2.4K Charting
- 695 Beast Mode
- 43 App Studio
- 39 Variables
- 658 Automate
- 170 Apps
- 441 APIs & Domo Developer
- 42 Workflows
- 5 DomoAI
- 32 Predict
- 12 Jupyter Workspaces
- 20 R & Python Tiles
- 386 Distribute
- 111 Domo Everywhere
- 269 Scheduled Reports
- 6 Software Integrations
- 113 Manage
- 110 Governance & Security
- 8 Domo University
- 30 Product Releases
- Community Forums
- 39 Getting Started
- 29 Community Member Introductions
- 98 Community Announcements
- Domo Community Gallery
- 4.8K Archive