Shopify - Month over Month % Change Beastmode Help
Hello,
I've tried to use this formula but it isn't working: I'm trying to calculate the % change MOM for count of customers. This using Shopify orders datasets.
(COUNT(DISTINCT CASE WHEN ((year(`processed_at`)=year(curdate())) AND (month(`processed_at`)=month(CURDATE()))) THEN `customer_id` END)
/
COUNT(DISTINCT CASE WHEN month(curdate()) = 1 THEN CASE WHEN year(`processed_at`) = year(curdate()) - 1 AND month(`processed_at`) = 12 AND DAYOFMONTH(`processed_at`) <= DAYOFMONTH(curdate()) THEN `customer_id` END ELSE CASE WHEN year(`processed_at`) = year(curdate()) AND month(`processed_at`) = month(curdate())-1 AND DAYOFMONTH(`processed_at`) <= DAYOFMONTH(curdate()) THEN `customer_id`END END)) -1
Any help would be amazing. I would love for it to look like this:
processed_at | Count of Customers | MOM Test |
2019-Aug | 14,182 | 0 |
2019-Sep | 13,296 | -6.2% |
2019-Oct | 12,696 | -4.5% |
2019-Nov | 15,139 | 19.2% |
2019-Dec | 24,438 | 61.4% |
2020-Jan | 20,409 | -16.5% |
2020-Feb | 18,516 | -9.3% |
2020-Mar | 27,727 | 49.7% |
2020-Apr | 57,895 | 108.8% |
2020-May | 67,365 | 16.4% |
2020-Jun | 61,438 | -8.8% |
2020-Jul | 36,652 | -40.3% |
Comments
-
@DMJerryVuori , you can adapt the design pattern in this video to get the desired result, https://www.youtube.com/watch?v=CDKNOmKClms
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0
Categories
- All Categories
- 1.4K Product Ideas
- 1.4K Ideas Exchange
- 1.4K Connect
- 1.2K Connectors
- 284 Workbench
- 4 Cloud Amplifier
- 4 Federated
- 2.9K Transform
- 88 SQL DataFlows
- 554 Datasets
- 2.2K Magic ETL
- 3.3K Visualize
- 2.3K Charting
- 562 Beast Mode
- 9 App Studio
- 27 Variables
- 577 Automate
- 140 Apps
- 414 APIs & Domo Developer
- 22 Workflows
- 1 DomoAI
- 28 Predict
- 12 Jupyter Workspaces
- 16 R & Python Tiles
- 350 Distribute
- 90 Domo Everywhere
- 258 Scheduled Reports
- 2 Software Integrations
- 91 Manage
- 88 Governance & Security
- 9 Product Release Questions
- Community Forums
- 42 Getting Started
- 28 Community Member Introductions
- 85 Community Announcements
- 4.8K Archive