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:
“There is a superhero in all of us, we just need the courage to put on the cape.” -Superman0
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:
“There is a superhero in all of us, we just need the courage to put on the cape.” -Superman0 -
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
- 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
- 710 Beast Mode
- 49 App Studio
- 39 Variables
- 668 Automate
- 170 Apps
- 446 APIs & Domo Developer
- 45 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