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
Welcome!
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>')
- END
David Cunningham
** Was this post helpful? Click Agree 😀, Like 👍️, or Awesome ❤️ below **
** Did this solve your problem? Accept it as a solution! ✔️**1 - CASE
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>')
- END
David Cunningham
** Was this post helpful? Click Agree 😀, Like 👍️, or Awesome ❤️ below **
** Did this solve your problem? Accept it as a solution! ✔️**1 - CASE
Welcome!
Welcome!
Categories
- All Categories
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 308 Workbench
- 6 Cloud Amplifier
- 10 Federated
- 3.8K Transform
- 660 Datasets
- 117 SQL DataFlows
- 2.2K Magic ETL
- 815 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 84 App Studio
- 46 Variables
- 780 Automate
- 191 Apps
- 482 APIs & Domo Developer
- 84 Workflows
- 23 Code Engine
- 41 AI and Machine Learning
- 21 AI Chat
- 2 AI Projects and Models
- 18 Jupyter Workspaces
- 414 Distribute
- 122 Domo Everywhere
- 281 Scheduled Reports
- 11 Software Integrations
- 146 Manage
- 142 Governance & Security
- 8 Domo Community Gallery
- 49 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 115 Community Announcements
- 4.8K Archive