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.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 301 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 103 SQL DataFlows
- 629 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 759 Beast Mode
- 61 App Studio
- 41 Variables
- 698 Automate
- 180 Apps
- 457 APIs & Domo Developer
- 51 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 399 Distribute
- 115 Domo Everywhere
- 277 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive