Best Of
Re: What's the best practice way to remove data from a partitioned dataset?
@DataMaven and @david_cunningham thank you both! I used the configuration setting to filter 2022 data out (after testing in another test partition) and it worked perfectly.
Re: Stream API - DataSet stack in Storing....
Typing on mobile is hard :) removed → recommend.
Re: BeastMode: New Field with Multiple Column Criteria
I think 3 beast modes is your best bet
case when application = 'App 2' then '' else application end
case when application = 'App 2' then '' else application_role end
case when application = 'App 2' then '' else client_name end
Re: Capture filters on a page
You can utilize the onFiltersUpdate function within your domo brick to capture the event when the filters are changed.
Re: concat() integers
So this answer makes use of a Beast Mode provided by @JacobFolsom from 2018. Thanks Jacob!
This answer is set up for a max of 9 digits. You can modify it if you need to handle more than that.
An example below. Value shows the base value, formatted with commas as Domo automatically does. The next column shows the CONCAT() label, where we can see the formatting is removed. The last column shows the CONCAT() label, but using a formatting beast mode.
Value Formatted is achieved using the below beast mode from Jacob.
CONCAT('Label: ',CASE
WHEN LENGTH(ROUND(SUM(Column))) = 9 -- 9 digits = hundreds of millions
THEN
CONCAT(
SUBSTRING(ROUND(SUM(Column)),1,3), -- first comma block
',',
SUBSTRING(ROUND(SUM(Column)), 3,3), -- second comma block
',',
SUBSTRING(ROUND(SUM(Column)),6,3) -- third comma block
)
WHEN LENGTH(ROUND(SUM(Column))) = 8 -- 8 digits = tens of millions
THEN
CONCAT(
SUBSTRING(ROUND(SUM(Column)),1,2), -- first comma block
',',
SUBSTRING(ROUND(SUM(Column)), 2,3), -- second comma block
',',
SUBSTRING(ROUND(SUM(Column)),6,3) -- third comma block
)
WHEN LENGTH(ROUND(SUM(Column))) = 7 -- 7 digits = millions
THEN
CONCAT(
SUBSTRING(ROUND(SUM(Column)),1,1), -- first comma block
',',
SUBSTRING(ROUND(SUM(Column)), 2,3), -- second comma block
',',
SUBSTRING(ROUND(SUM(Column)),5,3) -- third comma block
)
WHEN LENGTH(ROUND(SUM(Column))) = 6 -- 6 digits = hundreds of thousands
THEN
CONCAT(
SUBSTRING(ROUND(SUM(Column)),1,3), -- first comma block
',',
SUBSTRING(ROUND(SUM(Column)), 4,3) -- second comma block
)
WHEN LENGTH(ROUND(SUM(Column))) = 5 -- 5 digits = tens of thousands
THEN
CONCAT(
SUBSTRING(ROUND(SUM(Column)),1,2), -- first comma block
',',
SUBSTRING(ROUND(SUM(Column)), 3,3) -- second comma block
)
WHEN LENGTH(ROUND(SUM(Column))) = 4 -- 4 digits = thousands
THEN
CONCAT(
SUBSTRING(ROUND(SUM(Column)),1,1), -- first comma block
',',
SUBSTRING(ROUND(SUM(Column)), 2,3) -- second comma block
)
WHEN LENGTH(ROUND(SUM(Column))) < 4 -- < 4 digits = hundreds or less
THEN ROUND(SUM(Column))
END)
Another option would be to divide your output value, and then format those abbreviated values. I.e. - instead of 100,000 | 100k, or 1,000,000 = 1,000K or 1M. That would require a different beast mode though.










