Help on Beast Mode Concat Format

Current I get for a Summary 2711 Meetings and $143043062 Total Est. Budget but I am looking for the $ amount to include comma separators and two decimal. Am using a beast mode of CONCAT(COUNT(`Meeting Identifier`),' Meetings and $', SUM(`Total Estimated Budget`),' Total Est. Budget') and I am a novice and painfully stuck. Any help is apprecaited.
Best Answer
-
What we could really use here is the FORMAT() function. @DaniBoy (hint, hint)
However, as that is not an option for beastmodes, we will have to get more creative with our solution.
It's going to look something like this... but I have not had the time to test it out:
CONCAT(
COUNT(`Meeting Identifier`)
,' Meetings and $'
,left(
round(sum(`Total Estimated Budget`),2),
MOD(
(LENGTH(round(sum(`Total Estimated Budget`),2))),3
))
,case when (LENGTH(round(sum(`Total Estimated Budget`),2))/3) >1 then ',' else '.' end
,case when (LENGTH(round(sum(`Total Estimated Budget`),2))/3) >1 then SUBSTRING(round(sum(`Total Estimated Budget`),2),MOD(
(LENGTH(round(sum(`Total Estimated Budget`),2))),3
)+1,3) else RIGHT(round(SUM(`Total Estimated Budget`),2),2) end
,case when (LENGTH(round(sum(`Total Estimated Budget`),2))/3) >2 then ',' end
,case when (LENGTH(round(sum(`Total Estimated Budget`),2))/3) >2 then SUBSTRING(round(sum(`Total Estimated Budget`),2),MOD(
(LENGTH(round(sum(`Total Estimated Budget`),2))),3
)+1,3) else RIGHT(round(SUM(`Total Estimated Budget`),2),2) end
,' Total Est. Budget'
)I did get this to work with my sample data:
0
Answers
-
What we could really use here is the FORMAT() function. @DaniBoy (hint, hint)
However, as that is not an option for beastmodes, we will have to get more creative with our solution.
It's going to look something like this... but I have not had the time to test it out:
CONCAT(
COUNT(`Meeting Identifier`)
,' Meetings and $'
,left(
round(sum(`Total Estimated Budget`),2),
MOD(
(LENGTH(round(sum(`Total Estimated Budget`),2))),3
))
,case when (LENGTH(round(sum(`Total Estimated Budget`),2))/3) >1 then ',' else '.' end
,case when (LENGTH(round(sum(`Total Estimated Budget`),2))/3) >1 then SUBSTRING(round(sum(`Total Estimated Budget`),2),MOD(
(LENGTH(round(sum(`Total Estimated Budget`),2))),3
)+1,3) else RIGHT(round(SUM(`Total Estimated Budget`),2),2) end
,case when (LENGTH(round(sum(`Total Estimated Budget`),2))/3) >2 then ',' end
,case when (LENGTH(round(sum(`Total Estimated Budget`),2))/3) >2 then SUBSTRING(round(sum(`Total Estimated Budget`),2),MOD(
(LENGTH(round(sum(`Total Estimated Budget`),2))),3
)+1,3) else RIGHT(round(SUM(`Total Estimated Budget`),2),2) end
,' Total Est. Budget'
)I did get this to work with my sample data:
0 -
ST_-Superman- - Endless thanks - worked like a charm. Now I just need to dive in and understand it for future use. You made me and my client happy campers. Very much apprecaited. And I have submitted FORMAT as an enhancement request as I know many others have also done.
0
Categories
- All Categories
- Product Ideas
- 2.1K Ideas Exchange
- Connect
- 1.3K Connectors
- 309 Workbench
- 7 Cloud Amplifier
- 10 Federated
- Transform
- 664 Datasets
- 120 SQL DataFlows
- 2.3K Magic ETL
- 824 Beast Mode
- Visualize
- 2.6K Charting
- 86 App Studio
- 46 Variables
- Automate
- 194 Apps
- 486 APIs & Domo Developer
- 90 Workflows
- 24 Code Engine
- AI and Machine Learning
- 23 AI Chat
- 4 AI Projects and Models
- 18 Jupyter Workspaces
- Distribute
- 119 Domo Everywhere
- 283 Scheduled Reports
- 11 Software Integrations
- Manage
- 143 Governance & Security
- 11 Domo Community Gallery
- 49 Product Releases
- 13 Domo University
- Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 116 Community Announcements
- 5K Archive