Is there a way to make a Summary display of a Beast Mode a color?
I have a beast mode calculation showing the percentage change that I am displaying as the Summary Number. Is there a way to color code the percentage where if it is positive, make the value green or if it is negative, then make it red?
Best Answer
-
You just have to use a concat() to convert it to a string and wrap it in the appropriate HTML strings. To change it to red, this should work:
CONCAT(
'<a style="color: #f00">',
[YOUR FORMULA],
'</a>')
To conditionally format it, you would just add that to a CASE:
CASE
WHEN [YOUR FORMULA]>=0 THEN [YOUR FORMULA]
ELSE
CONCAT(
'<a style="color: #f00">',
[YOUR FORMULA],
'</a>')
END
You'll lose the ability to format the value using the GUI of the summary number, so you may need to do that within your formula, too, i.e.
'$', round([YOUR FORMULA])
Please 💡/💖/👍/😊 this post if you read it and found it helpful.
Please accept the answer if it solved your problem.
0
Answers
-
Yes, you can. It requires adding HTML and also formatting your value because it becomes a string in the process. This post outlines how to do it.
I have gone away from this method and stacked a multi-value gauge on top of my other chart as @PaulJames suggests as it requires a lot less effort.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.2 -
While I saw the Multi-Value chart option. I was hoping to show the billing change as the Summary on the Billing Card tracking the monthly billing.
Here is my Beast Mode calcualtion:
(sum(case when MONTH(
invoice_date
)=MONTH(CURRENT_DATE() - interval 12 month) and YEAR(invoice_date
)=year(CURDATE() - interval 12 month) thentotal_amount_billed
else 0 end)sum(case when MONTH(
invoice_date
)=MONTH(CURRENT_DATE() - interval 13 month) and YEAR(invoice_date
)=year(CURDATE() - interval 13 month) thentotal_amount_billed
else 0 end))
/sum(case when MONTH(
invoice_date
)=MONTH(CURRENT_DATE() - interval 13 month) and YEAR(invoice_date
)=year(CURDATE() - interval 13 month) thentotal_amount_billed
else 0 end)I do not quite see how to specifically add color to make the Summary Number a color. Is this even possible?
I saw a DOMO page that makes it seem like it is an option, but doesn't quite say how to do it easily:
.
0 -
You just have to use a concat() to convert it to a string and wrap it in the appropriate HTML strings. To change it to red, this should work:
CONCAT(
'<a style="color: #f00">',
[YOUR FORMULA],
'</a>')
To conditionally format it, you would just add that to a CASE:
CASE
WHEN [YOUR FORMULA]>=0 THEN [YOUR FORMULA]
ELSE
CONCAT(
'<a style="color: #f00">',
[YOUR FORMULA],
'</a>')
END
You'll lose the ability to format the value using the GUI of the summary number, so you may need to do that within your formula, too, i.e.
'$', round([YOUR FORMULA])
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.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 57 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive