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
- 10.5K All Categories
- 8 Connect
- 918 Connectors
- 250 Workbench
- 470 Transform
- 1.7K Magic ETL
- 69 SQL DataFlows
- 477 Datasets
- 194 Visualize
- 253 Beast Mode
- 2.1K Charting
- 11 Variables
- 17 Automate
- 354 APIs & Domo Developer
- 89 Apps
- 3 Workflows
- 20 Predict
- 5 Jupyter Workspaces
- 15 R & Python Tiles
- 247 Distribute
- 63 Domo Everywhere
- 243 Scheduled Reports
- 21 Manage
- 42 Governance & Security
- 174 Product Ideas
- 1.2K Ideas Exchange
- 12 Community Forums
- 27 Getting Started
- 14 Community Member Introductions
- 55 Community News
- 4.5K Archive