Best Of
Re: A more flexible way to do Period over Period comparisons
Addendum
Here's a corrected / updated Magic ETL implementation as the prior version had some incorrect offset values.
{"contentType":"domo/dataflow-actions","data":[{"name":"Domo Dimensions - Calendar","id":"3ea88485-92ab-455d-8e70-118cdd851191","type":"LoadFromVault","gui":{"x":60,"y":18,"color":3238043,"colorSource":null},"dependsOn":[],"removeByDefault":false,"notes":[],"dataSourceId":"d6b99a99-63c7-46f0-8e54-38045e29e710","executeFlowWhenUpdated":false,"onlyLoadNewVersions":false,"columnSettings":{},"visiblePartitionColumn":null},{"name":"Current","id":"66ec18a6-b8dd-4fff-a67d-7195583d1d24","type":"Constant","gui":{"x":168,"y":18,"color":null,"colorSource":null},"dependsOn":["3ea88485-92ab-455d-8e70-118cdd851191"],"removeByDefault":false,"notes":[],"fields":[{"name":"Period Type","type":"STRING","expr":null,"value":"Current"}]},{"name":"Current Date","id":"436c9649-202a-4da3-a300-1cdfc37c42db","type":"DateCalculator","gui":{"x":276,"y":18,"color":null,"colorSource":null},"dependsOn":["66ec18a6-b8dd-4fff-a67d-7195583d1d24"],"removeByDefault":false,"notes":[],"calculations":[{"fieldName":"Comparison Date","calcType":"ADD_SUBTRACT_DATE","fieldA":"dt","exprA":null,"constantA":null,"fieldB":null,"exprB":null,"constantB":{"value":"0","type":"LONG"},"fieldC":null,"exprC":null,"constantC":{"type":"STRING","value":"DAYS"}}]},{"name":"Last Week","id":"cf47b30d-dd64-4dc3-8be9-0bc7f157efdd","type":"Constant","gui":{"x":168,"y":114,"color":null,"colorSource":null},"dependsOn":["3ea88485-92ab-455d-8e70-118cdd851191"],"removeByDefault":false,"notes":[],"fields":[{"name":"Period Type","type":"STRING","expr":null,"value":"Last Week"}]},{"name":"Last Week Date","id":"25e60073-8cae-4ec4-a85a-e72b19c539c9","type":"DateCalculator","gui":{"x":276,"y":114,"color":null,"colorSource":null},"dependsOn":["cf47b30d-dd64-4dc3-8be9-0bc7f157efdd"],"removeByDefault":false,"notes":[],"calculations":[{"fieldName":"Comparison Date","calcType":"ADD_SUBTRACT_DATE","fieldA":"dt","exprA":null,"constantA":null,"fieldB":null,"exprB":null,"constantB":{"value":"7","type":"LONG"},"fieldC":null,"exprC":null,"constantC":{"type":"STRING","value":"-DAYS"}}]},{"name":"Last Month","id":"5231a16c-b884-491e-b644-2a3d65efa9ab","type":"Constant","gui":{"x":168,"y":210,"color":null,"colorSource":null},"dependsOn":["3ea88485-92ab-455d-8e70-118cdd851191"],"removeByDefault":false,"notes":[],"fields":[{"name":"Period Type","type":"STRING","expr":null,"value":"Last Month"}]},{"name":"Last Month Date","id":"a24b1efd-4f25-49af-aefb-73db6b554ff6","type":"DateCalculator","gui":{"x":276,"y":216,"color":null,"colorSource":null},"dependsOn":["5231a16c-b884-491e-b644-2a3d65efa9ab"],"removeByDefault":false,"notes":[],"calculations":[{"fieldName":"Comparison Date","calcType":"ADD_SUBTRACT_DATE","fieldA":"dt","exprA":null,"constantA":null,"constantB":{"value":"1","type":"LONG"},"fieldC":null,"exprC":null,"constantC":{"type":"STRING","value":"-MONTHS"}}]},{"name":"28 Days Ago","id":"a62144ce-10f6-4039-94c6-2e11432f1ef2","type":"Constant","gui":{"x":168,"y":306,"color":null,"colorSource":null},"dependsOn":["3ea88485-92ab-455d-8e70-118cdd851191"],"removeByDefault":false,"notes":[],"fields":[{"name":"Period Type","type":"STRING","expr":null,"value":"28 Days Ago"}]},{"name":"28 Days Ago Date","id":"1815477c-0704-4d66-9c21-e48b5c3554be","type":"DateCalculator","gui":{"x":276,"y":306,"color":null,"colorSource":null},"dependsOn":["a62144ce-10f6-4039-94c6-2e11432f1ef2"],"removeByDefault":false,"notes":[],"calculations":[{"fieldName":"Comparison Date","calcType":"ADD_SUBTRACT_DATE","fieldA":"dt","exprA":null,"constantA":null,"constantB":{"value":"28","type":"LONG"},"fieldC":null,"exprC":null,"constantC":{"type":"STRING","value":"-DAYS"}}]},{"name":"Last Year","id":"ef158a02-fd86-44d1-99bf-09195c4b4496","type":"Constant","gui":{"x":168,"y":402,"color":null,"colorSource":null},"dependsOn":["3ea88485-92ab-455d-8e70-118cdd851191"],"removeByDefault":false,"notes":[],"fields":[{"name":"Period Type","type":"STRING","expr":null,"value":"Last Year"}]},{"name":"Last Year Date","id":"86d4f7ec-1e4e-4e50-91b4-a44099fd2cf0","type":"DateCalculator","gui":{"x":276,"y":402,"color":null,"colorSource":null},"dependsOn":["ef158a02-fd86-44d1-99bf-09195c4b4496"],"removeByDefault":false,"notes":[],"calculations":[{"fieldName":"Comparison Date","calcType":"ADD_SUBTRACT_DATE","fieldA":"dt","exprA":null,"constantA":null,"constantB":{"value":"12","type":"LONG"},"fieldC":null,"exprC":null,"constantC":{"type":"STRING","value":"-MONTHS"}}]},{"name":"Last Year DOW","id":"9eaae432-7bc6-49d7-b451-81e58f6265bf","type":"Constant","gui":{"x":168,"y":498,"color":null,"colorSource":null},"dependsOn":["3ea88485-92ab-455d-8e70-118cdd851191"],"removeByDefault":false,"notes":[],"fields":[{"name":"Period Type","type":"STRING","expr":null,"value":"Last Year DOW"}]},{"name":"Last Year DOW Date","id":"7f79d3cf-718c-4bea-9b19-9a257260fc4d","type":"DateCalculator","gui":{"x":276,"y":498,"color":null,"colorSource":null},"dependsOn":["9eaae432-7bc6-49d7-b451-81e58f6265bf"],"removeByDefault":false,"notes":[],"calculations":[{"fieldName":"Comparison Date","calcType":"ADD_SUBTRACT_DATE","fieldA":"dt","exprA":null,"constantA":null,"fieldB":null,"exprB":null,"constantB":{"value":"364","type":"LONG"},"fieldC":null,"exprC":null,"constantC":{"type":"STRING","value":"-DAYS"}}]},{"name":"Append Rows","id":"986ae138-d19f-4f35-81c5-26a888471497","type":"UnionAll","gui":{"x":552,"y":228,"color":null,"colorSource":null},"dependsOn":["436c9649-202a-4da3-a300-1cdfc37c42db","25e60073-8cae-4ec4-a85a-e72b19c539c9","a24b1efd-4f25-49af-aefb-73db6b554ff6","1815477c-0704-4d66-9c21-e48b5c3554be","86d4f7ec-1e4e-4e50-91b4-a44099fd2cf0","7f79d3cf-718c-4bea-9b19-9a257260fc4d"],"removeByDefault":false,"notes":[],"unionType":"INCLUDE_ALL","strict":false},{"name":"Select Columns","id":"4c0c4d70-c9c5-4d7d-ae89-6bf7278e6abf","type":"SelectValues","gui":{"x":647,"y":228,"color":null,"colorSource":null},"dependsOn":["986ae138-d19f-4f35-81c5-26a888471497"],"removeByDefault":false,"notes":[],"fields":[{"name":"dt","rename":"Report Date"},{"name":"Period Type","rename":null},{"name":"Comparison Date","rename":null}]},{"name":"Calendar Dates With Offsets - Magic ETL","id":"1abf7dfe-23c2-4641-8a6d-1744f8d6410f","type":"PublishToVault","gui":{"x":768,"y":228,"color":null,"colorSource":null},"dependsOn":["4c0c4d70-c9c5-4d7d-ae89-6bf7278e6abf"],"removeByDefault":false,"notes":[],"dataSource":{"guid":"f0f185c5-8343-45a2-863b-f1ddd7514ac5","type":"DataFlow","name":"Calendar Dates With Offsets - Magic ETL","cloudId":"domo"},"versionChainType":"REPLACE","partitionIdColumns":[]}]}
Re: Pivot Table showing correct grand totals but not all records
@dgsinclair are you sorting by anything? That will usually mess up totals.
Ashleigh
Re: Finding the sum of values based on a common column, excluding duplicates
You’d need to incorporate a calendar dimension table in an ETL. However because magic ETL doesn’t support conditional joins it gets a little messy. You would need to add a constant to both a Calendar data set and your actual data set and Collett join column and set it to a value of one. Then you would join your calendar Dataset to your actual data set based on just the join column. After the join then you would filter your data such that the calendar date is between your start date and end date. Then you would run a group by based off of your ID and count distinct the different dates . After that you can then join this outfit to your original Dataset based on the id field to get your sum.
alternatively you could go with the MySQL dataflow to do the conditional join with the same calendar Dataset and your actual data set and then also doing a group by on your ID and then doing a count distinct on the dates. It is a little simpler and easier to understand but magic ETL tends to run much faster than MySQL
Re: Including multiple values on on card
Minor edit to @GrantSmith 's suggestion, to re-format the percentage:
CONCAT(SUM(`delivers`), ' delivers ', ROUND((SUM(`delivers`)/SUM(`total`))*100,0), '% delivery rate')
Re: Arbitrary Periods as Pivot Table Columns
@WillClark My company has a card that does something similar with YTD, MTD, last week, etc. You'll need to write a beast mode for each time period you want to calculate, and use the current date to determine what gets included. A YTD beast mode would look something like this:
case when YEAR('date') = YEAR((date(CONVERT_TZ( now() , 'GMT','your_timezone'))) then 'Amount' end
Then when you add your column just set it to the desired aggregation. Then you'll just go through use the available date functions in Domo to do the comparisons with the current date for the rest of your time periods:
- MTD: mm/yyyy of 'date' = mm/yyyy of current date
- This week: ww/yyyy of 'date' = ww/yyyy of current date
- Last week: ww/yyyy of 'date' + 1 week = ww/yyyy of current date
Re: How to add a Background image to the dashboard
@Silambarasan_3008 if you haven't watched this walkthrough on building a dashboard, this is helpful. It's probably the nicest dashboard I have seen.
https://www.domo.com/help-center/videos/watch/yXFS2uvD5Es/cat/PLc_JazWEwlVqiRoWcbD5My1Bw0_IpMX8z
Re: Status of Ideas in Idea Exchange
I'd be keen for this as well! There's plenty of similar ideas across Exchange that just need to be consolidated. Perhaps there can be an additional step during any post for ideas submission where the Admins can review the post against any existing comments before approving for voting.
amehdad
Re: Can I save a copy of a card's drill path as a standalone card?
Thanks for sharing that @MichelleH
amehdad
Re: Email connector for Google Ads Report
Hi @Ainash, on your 2nd question, have a read of this knowledge article: https://domohelp.domo.com/hc/en-us/articles/360060270674-Google-Ads-Connector#4.0.1.
amehdad



