app studio text
I am starting to use App Studio and would like to do something creative with text. I would like to give a description of charts with text. For example, i would like to create some conditions such as ''met budget'' and to have this in green, otherwise if we did not hit budget to say 'miss budget' based on numbers. Is there any way to represent this? Also is there any way to call the month (August) as a variable or otherwise?
Best Answer
-
My favorite way to do this is in the summary number. You can apply HTML formatting tags to summary numbers. Here's an article with some examples:
I sometimes will use a text card with blank text and only a summary number, since I have more control over the formatting of the summary number than the card itself.
For your case, depending on how your data is set up, your summary number could be something like:
CASE
WHEN SUM(`VALUE`) < AVG(`BUDGET`) THEN
CONCAT('<div style =color:#009E73; font-size:18px; font-weight:900; background-color:#beedd7>',
'Met budget', '</div>')
else
CONCAT('<div style =color:#D55e00; font-size:18px; font-weight:900; background-color:#ffdac4>',
'Miss budget', '</div>')
END
I threw in some other formatting tags you might want in addition to text color.
Please π‘/π/π/π this post if you read it and found it helpful.
Please accept the answer if it solved your problem.
0
Answers
-
My favorite way to do this is in the summary number. You can apply HTML formatting tags to summary numbers. Here's an article with some examples:
I sometimes will use a text card with blank text and only a summary number, since I have more control over the formatting of the summary number than the card itself.
For your case, depending on how your data is set up, your summary number could be something like:
CASE
WHEN SUM(`VALUE`) < AVG(`BUDGET`) THEN
CONCAT('<div style =color:#009E73; font-size:18px; font-weight:900; background-color:#beedd7>',
'Met budget', '</div>')
else
CONCAT('<div style =color:#D55e00; font-size:18px; font-weight:900; background-color:#ffdac4>',
'Miss budget', '</div>')
END
I threw in some other formatting tags you might want in addition to text color.
Please π‘/π/π/π this post if you read it and found it helpful.
Please accept the answer if it solved your problem.
0 -
thanks this is VERY helpful. here is the problem i am facing nowβ¦ When i try this it just resolved to a number when my beast mode is a case statement which has textβ¦..
0 -
Sorry, I meant the "summary number" that's part of any analytics card. I don't think you can apply html tags to smart text within a text card (unless someone knows a way to do that?) The other warning is that HTML tags don't show up in previews; you have to save and close a card to see the formatting applied. Finally, I find these generally work best when you aggregate the values (i.e., put them inside a sum or avg or other aggregating function). Unless your dataset is a single row, it will struggle to combine values and text.
Please π‘/π/π/π this post if you read it and found it helpful.
Please accept the answer if it solved your problem.
0
Categories
- All Categories
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 311 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3.8K Transform
- 656 Datasets
- 115 SQL DataFlows
- 2.2K Magic ETL
- 813 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 81 App Studio
- 45 Variables
- 773 Automate
- 190 Apps
- 481 APIs & Domo Developer
- 79 Workflows
- 23 Code Engine
- 38 AI and Machine Learning
- 19 AI Chat
- AI Playground
- 1 AI Projects and Models
- 18 Jupyter Workspaces
- 410 Distribute
- 120 Domo Everywhere
- 280 Scheduled Reports
- 10 Software Integrations
- 143 Manage
- 139 Governance & Security
- 8 Domo Community Gallery
- 48 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 114 Community Announcements
- 4.8K Archive