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"1
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 292 Workbench
- 4 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 95 SQL DataFlows
- 600 Datasets
- 2.1K Magic ETL
- 3.7K Visualize
- 2.4K Charting
- 685 Beast Mode
- 43 App Studio
- 38 Variables
- 656 Automate
- 170 Apps
- 439 APIs & Domo Developer
- 42 Workflows
- 5 DomoAI
- 32 Predict
- 12 Jupyter Workspaces
- 20 R & Python Tiles
- 384 Distribute
- 110 Domo Everywhere
- 268 Scheduled Reports
- 6 Software Integrations
- 111 Manage
- 108 Governance & Security
- 8 Domo University
- 25 Product Releases
- Community Forums
- 39 Getting Started
- 29 Community Member Introductions
- 98 Community Announcements
- Domo Community Gallery
- 4.8K Archive