Best Of
Re: Is there a way to run ad-hoc SQL queries against arbitrary PostgreSQL tables?
@maodag Have you tried the PostgreSQL connector (non-federated)? It looks like you can write a query directly in this version of the connector: https://domo-support.domo.com/s/article/360043436273?language=en_US
Re: Getting the last field of a character-separated string
Hi @froghunter ,
Here are a couple ways to do it. If the last value is all the same length, you can use the RIGHT feature in text. If not, then you need to do the split to columns/ delimiting trick you were doing.
Here's a video that I hope is helpful: https://www.loom.com/share/3f7c949e382a442a903a32e9005f168e
Good luck,
John Le of Dashboard Dudes
You're only one dashboard away. More video solutions at: https://www.dashboarddudes.com/pantry
Re: Are Rank functions case-insensitive?
@AndreiA I would try using the str_to_hex function on your id field in the formula tile and then build the rank off of that. This will allow the rank to see those two values as different values rather than the same.
Re: Edit String in Beastmode or ETL
Hi colinr,
There are a couple of ways to do this. This can't be done in Beast Mode because it doesn't support the instr function looking from right to left.
- MySQL Flow (this is the easiest option)
trim(right(`Text`, instr(reverse(`Text`), ' | ')))
- The "text" field would be your text field. I added the trim in there because I couldn't remember if this would leave space padding on the left or not.
- ETL Flow
- Here is the whole flow. I assume you have a limit on how many texts are delimited in your field. In this example I put 6 as the max, but you can easily just add more.
- Input Data Set
- Split Column on Delimiter = " | "
- Collapse Columns to put the split columns in a row
- String Operation to trim spaces from the text field
- Filter rows to text field is not null
- Set column type. Set the rank to whole number
- Group by to get the max rank
- Inner Join back on itself to only pull through max ranks
- Select statement to rename fields and drop off some
- Here is the json code from my example flow. If you copy it, then click into some blank space on the etl, it should paste right in there.
{"contentType":"domo/dataflow-actions","data":[{"name":"test","id":"7ad5dc70-db63-4bba-8ca4-62f08d7e8073","type":"LoadFromVault","gui":{"x":24,"y":48},"dependsOn":[],"removeByDefault":false,"dataSourceId":"48368a1c-3227-436b-8e21-90088fd39c14","executeFlowWhenUpdated":false,"onlyLoadNewVersions":false,"recentVersionCutoffMs":0},{"name":"Split Column","id":"f90acc6d-de26-4777-a826-943a1576fadc","type":"SplitColumnAction","gui":{"x":144,"y":48},"dependsOn":["7ad5dc70-db63-4bba-8ca4-62f08d7e8073"],"removeByDefault":false,"sourceColumn":"Text","delimiterType":"CUSTOM","delimiter":" | ","useRegex":false,"additions":[{"name":"1","dataType":"STRING"},{"name":"2","dataType":"STRING"},{"name":"3","dataType":"STRING"},{"name":"4","dataType":"STRING"},{"name":"5","dataType":"STRING"},{"name":"6","dataType":"STRING"}]},{"name":"Collapse Columns","id":"54ec4815-c991-4b0d-b456-44349e7c3965","type":"Normalizer","gui":{"x":276,"y":48},"dependsOn":["f90acc6d-de26-4777-a826-943a1576fadc"],"removeByDefault":false,"typefield":"Rank","fields":[{"sourceField":"1","typefieldValue":"1","destField":"New Text"},{"sourceField":"2","typefieldValue":"2","destField":"New Text"},{"sourceField":"3","typefieldValue":"3","destField":"New Text"},{"sourceField":"4","typefieldValue":"4","destField":"New Text"},{"sourceField":"5","typefieldValue":"5","destField":"New Text"},{"sourceField":"6","typefieldValue":"6","destField":"New Text"}]},{"name":"String Operations","id":"3d67df50-8d34-49c3-b0d9-9fec7b018d6e","type":"StringCalculator","gui":{"x":408,"y":48},"dependsOn":["54ec4815-c991-4b0d-b456-44349e7c3965"],"removeByDefault":false,"calculations":[{"calcType":"TRIM","constantB":{"value":"BOTH","type":"STRING"},"fieldA":"New Text","fieldName":"Trimmed Text"}]},{"name":"Filter Rows","id":"276293e4-d8d5-4b92-870d-c1764501ba91","type":"Filter","gui":{"x":528,"y":48},"dependsOn":["3d67df50-8d34-49c3-b0d9-9fec7b018d6e"],"removeByDefault":false,"filterList":[{"leftField":"Trimmed Text","operator":"NN","andFilterList":[]}]},{"name":"Set Column Type","id":"ad71912a-9e28-4475-b461-0b9c251bb183","type":"Metadata","gui":{"x":60,"y":192},"dependsOn":["276293e4-d8d5-4b92-870d-c1764501ba91"],"removeByDefault":false,"fields":[{"name":"Rank","type":"LONG"}]},{"name":"Group By","id":"9128dfbe-ab36-424a-90c3-3ef1a1e4c258","type":"GroupBy","gui":{"x":192,"y":312},"dependsOn":["ad71912a-9e28-4475-b461-0b9c251bb183"],"removeByDefault":false,"addLineNumber":false,"lineNumberFieldname":null,"giveBackRow":false,"allRows":false,"groups":[{"name":"ID"}],"fields":[{"name":"Rank","source":"Rank","type":"MAX"}]},{"type":"MergeJoin","name":"Join Data","id":"c32d5a7d-ccfa-40f2-91d7-60afaa50f825","gui":{"x":288,"y":192},"dependsOn":["ad71912a-9e28-4475-b461-0b9c251bb183","9128dfbe-ab36-424a-90c3-3ef1a1e4c258"],"joinType":"INNER","step1":"ad71912a-9e28-4475-b461-0b9c251bb183","step2":"9128dfbe-ab36-424a-90c3-3ef1a1e4c258","keys1":["ID","Rank"],"keys2":["ID","Rank"]},{"name":"Select Columns","id":"904e7e19-e979-47ac-8968-2e0b25c5360a","type":"SelectValues","gui":{"x":396,"y":192},"dependsOn":["c32d5a7d-ccfa-40f2-91d7-60afaa50f825"],"removeByDefault":false,"fields":[{"name":"ID"},{"name":"Trimmed Text","rename":"Text"},{"name":"Rank"}]},{"name":"test output","id":"b3cd72e8-8090-40f7-b22d-718e19bd6a9d","type":"PublishToVault","gui":{"x":528,"y":192},"dependsOn":["904e7e19-e979-47ac-8968-2e0b25c5360a"],"removeByDefault":false,"dataSource":{"name":"test output"}}]}
I couldn't figure out how to insert photos so I've attached them in order.
I hope this helps!
Re: Quarter Filter On a dashboard
You can mimic the date range quarter display by using CONCAT in a beast mode like this:
CONCAT(YEAR(`dt`),'-Q',QUARTER(`dt`))
If this is applied to all your datasets, then this should work as a shared filter.
The other option would be to use the date field that is driving your date range as your shared filter and use the between condition in the range. This would require people to enter in the start and end dates, so it may not be ideal for you.
Re: Google Ads Connector - Location Data
@Mickey here you go: https://docs.google.com/spreadsheets/d/1M6yvCfH5RI93H_Vg8sEFWhU1WrRIP9a7UgrFnjKdpl4/edit?usp=sharing
John Le
More video solutions at https://www.dashboarddudes.com/pantry
Re: Need help with Weighted Average
@Jean_McDonald A couple observations about your formula:
- The SUMPRODUCT formula in your Excel example multiplies call and email productivity by their respective weights and adds them together. Your formula in Domo simply adds all 4 percentages together, which results in the weighted averages above 100%
- Assuming the weights in AF and AG always add up to 100%, you do not need a denominator
Try this instead:
`Email Productivity%` * `% Weight Email` + `Call Productivity %` * `% Weighted Calls`
Re: YOY count
Those period-over-period cards are kind of different in how they function. I believe your summary number isn't working as you want because your date range filter is set to this year. That keeps anything that would be in the denominator portion of your formula from being counted since that is looking for the previous year. Meanwhile, the bar chart portion of the period-over-period cards need you to set the date range the way you did.
A couple options come to mind. Instead of using the summary number, you can use the multi-value gauge and it won't require you to build a beast mode. You can set the date range filter to graph by year and then configure the chart properties to show the percent change between the last 2 years.
Another option is to use a standard bar chart and built the year series as a beast mode. I walk through how to do that here.



