HTML/CSS issue (Summary# data showing on separate lines)


Did a lot of reading from previous posts about using HTML/CSS in Summary#'s and wanted to give it a try for a card, and while it looks great and provides a very effective quick view to determine lost time, can't seem to get this to display properly, i.e. on a single line (we wanted to make the lost time standout, using RED as the color).
Just wondering if another pair of eyes might be able to pickup on the issue in the HTML/CSS markup we're using that places the two metrics onto separate lines within the Summary# calculation? I'm pretty certain it has to do with the DIV's being used, possibly the placement, but can't seem to find another way to show the total time in RED without placing that within a second DIV which seems to be the culprit?
Any thoughts on updates to the markup for this? Thanks!
SUMMARY NUMBER:
CONCAT (
'<div style="font-size: 28px; width: 100%; height:100%; margin:-20px; padding:20px;">', CONCAT
(COUNT(CASE WHEN `Late By` <> '' THEN (SUBSTRING(`Late By`, 1, (INSTR(`Late By`, 'm')-1)) ) + SUBSTRING(`Late By`, (INSTR(`Late By`, 'm')+2), (INSTR(`Late By`, 's'))-(INSTR(`Late By`, 'm')+2)) / 60 ELSE 0 END), ' instances','
<div style="font-size: 20px; color: red;">
(', SUM(CASE WHEN `Late By` <> '' THEN (SUBSTRING(`Late By`, 1, (INSTR(`Late By`, 'm')-1)) ) + SUBSTRING(`Late By`, (INSTR(`Late By`, 'm')+2), (INSTR(`Late By`, 's'))-(INSTR(`Late By`, 'm')+2)) / 60 ELSE 0 END), ' minutes) ', '</div>','</div>'))
Best Answer
-
Stepped back a minute, and realized the issue - using another DIV within the markup when it should've been SPAN instead! Sorry for not seeing that before posting, my mistake.
CONCAT
(
'<div style="font-size: 28px; width: 100%; height:100%; margin:-20px; padding:20px;">',
CONCAT
(COUNT(CASE WHEN `Late By` <> '' THEN (SUBSTRING(`Late By`, 1, (INSTR(`Late By`, 'm')-1)) ) + SUBSTRING(`Late By`, (INSTR(`Late By`, 'm')+2), (INSTR(`Late By`, 's'))-(INSTR(`Late By`, 'm')+2)) / 60 ELSE 0 END), ' instances',
'<span style="font-size: 20px; color: red;">
(', SUM(CASE WHEN `Late By` <> '' THEN (SUBSTRING(`Late By`, 1, (INSTR(`Late By`, 'm')-1)) ) + SUBSTRING(`Late By`, (INSTR(`Late By`, 'm')+2), (INSTR(`Late By`, 's'))-(INSTR(`Late By`, 'm')+2)) / 60 ELSE 0 END), ' minutes)' ,'</span>',
'</div>')
)1
Answers
-
Stepped back a minute, and realized the issue - using another DIV within the markup when it should've been SPAN instead! Sorry for not seeing that before posting, my mistake.
CONCAT
(
'<div style="font-size: 28px; width: 100%; height:100%; margin:-20px; padding:20px;">',
CONCAT
(COUNT(CASE WHEN `Late By` <> '' THEN (SUBSTRING(`Late By`, 1, (INSTR(`Late By`, 'm')-1)) ) + SUBSTRING(`Late By`, (INSTR(`Late By`, 'm')+2), (INSTR(`Late By`, 's'))-(INSTR(`Late By`, 'm')+2)) / 60 ELSE 0 END), ' instances',
'<span style="font-size: 20px; color: red;">
(', SUM(CASE WHEN `Late By` <> '' THEN (SUBSTRING(`Late By`, 1, (INSTR(`Late By`, 'm')-1)) ) + SUBSTRING(`Late By`, (INSTR(`Late By`, 'm')+2), (INSTR(`Late By`, 's'))-(INSTR(`Late By`, 'm')+2)) / 60 ELSE 0 END), ' minutes)' ,'</span>',
'</div>')
)1
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
- 659 Datasets
- 116 SQL DataFlows
- 2.2K Magic ETL
- 816 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 82 App Studio
- 45 Variables
- 776 Automate
- 190 Apps
- 481 APIs & Domo Developer
- 82 Workflows
- 23 Code Engine
- 41 AI and Machine Learning
- 20 AI Chat
- 1 AI Playground
- 2 AI Projects and Models
- 18 Jupyter Workspaces
- 411 Distribute
- 120 Domo Everywhere
- 280 Scheduled Reports
- 11 Software Integrations
- 144 Manage
- 140 Governance & Security
- 8 Domo Community Gallery
- 48 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 115 Community Announcements
- 4.8K Archive