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.9K Product Ideas
- 1.9K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 302 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 104 SQL DataFlows
- 637 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 762 Beast Mode
- 65 App Studio
- 42 Variables
- 704 Automate
- 182 Apps
- 458 APIs & Domo Developer
- 53 Workflows
- 11 DomoAI
- 39 Predict
- 16 Jupyter Workspaces
- 23 R & Python Tiles
- 401 Distribute
- 116 Domo Everywhere
- 277 Scheduled Reports
- 8 Software Integrations
- 133 Manage
- 130 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 111 Community Announcements
- 4.8K Archive