Default Message
I want a card with a single line of text. Not a table. This is to act like a caption textbox. To indicate last run. The text is to indicate most recent date within the dataset. Assume there's a column called [date].
Here's the tricky part. This date must be based on the data itself. We have many offices. When filtered to an office, this card needs to show the most recent for the filtered office. When no office is selected, I want it to show the most recent date for the dataset.
In SQL, it would be something like if count(*)=1 then XXX else ZZZ. But I don't know a Domo equivalent to COUNT(*) in a calculated field.
** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **
Best Answer
-
@ArborRose how about something like this. you can see we have a max date per group.
Set the default to the max date when count > 1, else use the group max date
None selected, defaults to overall max date
1 selected - shows date for group
case when COUNT(DISTINCT group) > 1 then MAX(date) else MAX(date) over (partition by group) end
David Cunningham
** Was this post helpful? Click Agree 😀, Like 👍️, or Awesome ❤️ below **
** Did this solve your problem? Accept it as a solution! ✔️**0
Answers
-
What about using the "Textbox" chart type, and then using [date] as the Text. This would then just be a simple caption that's populated by the date field within the dataset.
That seems too easy so I must be missing something, ArborRose.
0 -
@ArborRose how about something like this. you can see we have a max date per group.
Set the default to the max date when count > 1, else use the group max date
None selected, defaults to overall max date
1 selected - shows date for group
case when COUNT(DISTINCT group) > 1 then MAX(date) else MAX(date) over (partition by group) end
David Cunningham
** Was this post helpful? Click Agree 😀, Like 👍️, or Awesome ❤️ below **
** Did this solve your problem? Accept it as a solution! ✔️**0 -
Yes, the trouble is trying to get it to give a most recent based on the data it has filtered or unfiltered. And then displaying it as text (so it can be used as a caption). David's answer doesn't put it in a text box, but it provides the same result in a card.
My question was posted last week. And I greatly appreciate y'all responding.
My solution was to put my output on a brick and control the entire card. I did this because my rows were dissimilar. The first two rows were year comparison. The next two were calculations based the difference and the %. When filtered, the display filters the numbers to the selection and shows the most recent data available based on the data it has aggregated.And because its a brick, I can also control the padding. It drives me nuts to have dashboards with padding forced on me. Even in a Domo app, NIL doesn't give 0 pixel padding.
** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 295 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 97 SQL DataFlows
- 608 Datasets
- 2.1K Magic ETL
- 3.8K Visualize
- 2.4K Charting
- 709 Beast Mode
- 49 App Studio
- 39 Variables
- 667 Automate
- 170 Apps
- 446 APIs & Domo Developer
- 44 Workflows
- 7 DomoAI
- 33 Predict
- 13 Jupyter Workspaces
- 20 R & Python Tiles
- 391 Distribute
- 111 Domo Everywhere
- 274 Scheduled Reports
- 6 Software Integrations
- 115 Manage
- 112 Governance & Security
- Domo Community Gallery
- 31 Product Releases
- 9 Domo University
- 5.3K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 103 Community Announcements
- 4.8K Archive