Best Of
Re: HELP with Case When Statement
Hi, @ST_-Superman-_ wow, this is awesome! Thank you so much for this. Will try this in ETL and let you know the feedback asap :D
Re: Splitting up multiple-value fields into multiple rows
If you know the possible values for each multi-select answer, you could create different calculated fields for each. Something like this:
`apple`
sum(case when `column 1` like '%apple%' then 1 else 0 end)
You would then do similar fields for cherry, banana, blue, red, green...
Then you can create a table card and drag these calculations into the columns section:
You can also use the "Transpose" option in the general chart properties to swap the columns and rows:
Re: HELP with Case When Statement
Hi @Zel
I used a filter tile to identify all alarm IDs that have both "Lost Connectivity" and "Disregard". I then left join that back to your original dataset after adding a column that says to exclude those IDs.
The resulting dataset looks like this:
Here is the JSON code that you can copy and paste into an ETL to mimic what I did.
{"contentType":"domo/dataflow-actions","data":[{"name":"@Zel Dojo","id":"6d9d3106-a084-481d-a69d-74840f17d018","type":"LoadFromVault","gui":{"x":36,"y":180,"color":3238043},"dependsOn":[],"removeByDefault":false,"notes":[],"dataSourceId":"864c1409-461e-46fc-b4b3-0ed644903782","executeFlowWhenUpdated":true,"onlyLoadNewVersions":false,"columnSettings":{},"visiblePartitionColumn":null,"versionWindow":null},{"name":"LostConnectivity and Disregard","id":"49f0cb44-56bb-4e19-ae8b-b83be193e3c6","type":"Filter","gui":{"x":144,"y":288},"dependsOn":["6d9d3106-a084-481d-a69d-74840f17d018"],"removeByDefault":false,"notes":[],"filterList":[{"leftField":"alarmDescription","rightValue":{"value":"Lost Connectivity","type":"STRING"},"operator":"EQ","andFilterList":[{"leftField":"alarmAction","rightValue":{"value":"Disregard","type":"STRING"},"operator":"EQ","andFilterList":[]}]}]},{"name":"Group By","id":"b8d8da16-2db0-4d88-9287-b349901d7d54","type":"GroupBy","gui":{"x":264,"y":288},"dependsOn":["49f0cb44-56bb-4e19-ae8b-b83be193e3c6"],"removeByDefault":false,"notes":[],"addLineNumber":false,"lineNumberFieldname":null,"giveBackRow":false,"allRows":false,"groups":[{"name":"alarmID"}],"partitionedAggregation":false,"fields":[{"name":"Count","source":"alarmID","type":"COUNT_ALL"}]},{"name":"Add Constants","id":"2c3aa4bb-07f5-45f4-abfa-26e9747f1fa5","type":"Constant","gui":{"x":372,"y":288},"dependsOn":["b8d8da16-2db0-4d88-9287-b349901d7d54"],"removeByDefault":false,"notes":[],"fields":[{"name":"FilterCriteria","type":"STRING","value":"exclude"}]},{"name":"Join Data","id":"e9e76a06-7a82-429a-bb3f-f1e912e1d6bc","type":"MergeJoin","gui":{"x":492,"y":180},"dependsOn":["6d9d3106-a084-481d-a69d-74840f17d018","2c3aa4bb-07f5-45f4-abfa-26e9747f1fa5"],"removeByDefault":false,"notes":[],"joinType":"LEFT OUTER","step1":"6d9d3106-a084-481d-a69d-74840f17d018","step2":"2c3aa4bb-07f5-45f4-abfa-26e9747f1fa5","keys1":["alarmID"],"keys2":["alarmID"],"schemaModification1":[],"schemaModification2":[{"name":"alarmID","rename":"","remove":true},{"name":"Count","rename":"","remove":true}],"partitioningInputId":""},{"name":"Add Formula","id":"9a80fd0d-33fb-4085-a20a-3ab856f5a762","type":"ExpressionEvaluator","gui":{"x":600,"y":180},"dependsOn":["e9e76a06-7a82-429a-bb3f-f1e912e1d6bc"],"removeByDefault":false,"notes":[],"expressions":[{"fieldName":"FilterCriteria","expression":"IFNULL(`FilterCriteria`,'include')","settings":null}]},{"name":"@Zel output","id":"f32d6203-2ab9-42b0-b44b-f0ee823202f3","type":"PublishToVault","gui":{"x":708,"y":180},"dependsOn":["9a80fd0d-33fb-4085-a20a-3ab856f5a762"],"removeByDefault":false,"notes":[],"dataSource":{"name":"@Zel output"},"partitionIdColumns":[],"upsertColumns":[]}]}
DOMO radio button - default value
Is there any way to set a default value for a radio button?
Re: Single Value Card - No numeric abbreviations
This has been bothering me for a while, thanks!
Re: Correlation Coefficient in Beastmode
I also cannot get the corr() function to work. However I did get it to work by manually creating the sql math in a beastmode.
Use this code:
(count(x) * sum(x * y) - sum(x) * sum(y)) / (sqrt(count(x) * sum(x * x) - sum(x) * sum(x)) * sqrt(count(x) * sum(y * y) - sum(y) * sum(y)))
Then replace x and y with your measure names.
Re: Regex Replace Issue
I found the issue. It was the top equation that didn't have the stc=? part in it.
Re: Dynamic Rank Beast Mode
@yentran Rank and dense rank use the window function, since Domo has to know how to group the data to perform the action of ranking. I believe window functions also have to be enabled for your Domo instance, so this might not work without that!
For the window functions you typically use nested aggregate functions like SUM(SUM('column_name')) and then have to define how you want Domo to organize the data. For ranks it's a little different and I don't think you need any nested aggregates and you can just use Rank instead. Something like this should work depending on what columns you use!
- RANK() OVER (PARTITION BY `column_to_create_subsets_in_your_data` ORDER BY 'column_name_to_determine_rank_order')
There are a lot of window related functions posts in Domo Dojo and they explain it better than I can haha, but hopefully this helps with why you're getting the error at least!






