Conditional Formatting One Column Based on a Different Column's Value
Hello,
Working with a table and attempting to change the color/format of "Column A" based on the value of "Column B" . I understand that I am able to change the format of the entire row or only Column B based on Column B's value, but not one specified column. Are there any settings in "Chart Properties" that I am missing? Or, perhaps, there is a Beast Mode to work around this? Thanks in advance for any help.
Best Answer
-
Hi,
I think that you have to go with the old method of HTML injection in this case.
Try this beast mode for Red BackGround:
CASE WHEN `ColumnA`='ColumnB' THEN
CONCAT('<div style="background-color:#fcbcb7; width: 100%; height:100%; margin:-20px; padding:20px"><a href="#">', `ColumnA`, '</a></div>')
ENDChange the background-color: to the desired colors, you can also use other HTML attributes.
You can get your HTML color codes from this site:
Hope this helps. Don't hesitate to ask in you need further help.
Ricardo Granada
MajorDomo@Lusiaves
**If the post solves your problem, mark it by clicking on "Accept as Solution"
**You can say "Thank you" by clicking the thumbs up in the post that helped you.0
Answers
-
Hi,
I think that you have to go with the old method of HTML injection in this case.
Try this beast mode for Red BackGround:
CASE WHEN `ColumnA`='ColumnB' THEN
CONCAT('<div style="background-color:#fcbcb7; width: 100%; height:100%; margin:-20px; padding:20px"><a href="#">', `ColumnA`, '</a></div>')
ENDChange the background-color: to the desired colors, you can also use other HTML attributes.
You can get your HTML color codes from this site:
Hope this helps. Don't hesitate to ask in you need further help.
Ricardo Granada
MajorDomo@Lusiaves
**If the post solves your problem, mark it by clicking on "Accept as Solution"
**You can say "Thank you" by clicking the thumbs up in the post that helped you.0 -
I have a new wrinkle to add to this problem. I would like to create a card that has one row for each account. Then I want to have a separate column for each of several different products. The trick is that I then want to be able to format the color of the values in each column based on the competitor name.
I have tried this by using the following beastmode:
CASE
WHEN `Product Group`='Product A' THEN
CASE
WHEN `competitor_name__c`='Competitor A' THEN
CONCAT('<div style="background-color:#7EAEFD; width: 100%; height:100%; margin:-20px; padding:20px"><a href="#">', `Product Group TAM`,'</div>')
WHEN `competitor_name__c`='Competitor B' THEN
CONCAT('<div style="background-color:#00FF00; width: 100%; height:100%; margin:-20px; padding:20px"><a href="#">', `Product Group TAM`,'</div>')(... continued for a number of competitors, but you get the idea)
ELSE '0'
END
ENDI then repeat this beast mode for `Product B`
The issue is that when I put these beastmodes on the table card, I am getting multiple rows for each account name.The orange box is for one account, I want this on one line
Any thoughts on how to accomplish this?
0 -
Can you wrap each of your product columns in a single MAX() function (ie MAX( CASE WHEN `Product.... END) ? That's what I've done in SQL in this kind of circumstance before and it's worked.
Aaron
MajorDomo @ Merit Medical
**Say "Thanks" by clicking the heart in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0 -
Nice solution, however the code will show if you try exporting the data.
I wish there was a conditional formatting solution built into the card design that would allow this natively so the data in the card itself wouldn't need to be manipulated.
We have a use case where we need the output to remain valid/exactly as it is but would like to alert/call out potential issues with the data by highlighting them on the card before someone tries to export it.
Thanks,
--Nick
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