Add rows based on Start and End Date
I have the following table within my output
Cust_No Start_Date End_Date Comp_Val Monthly_Val
123 2023-01-01 2023-06-30 1100 55.95
123 2023-07-01 2024-02-05 1100 22.90
As you can see, the months between start_date and end_date for this example, is 13+ months.
What I would like to see is a row for each Year_Month between Start_Date and End_Date with a new variable added (Year_Month)
Example
Cust_No Start_Date End_Date Comp_Val Monthly_Val Year_Month
123 2023-01-01 2023-01-30 1100 55.95 2023-01
123 2023-02-01 2023-02-28 1100 55.95 2023-02
123 2023-03-01 2023-03-31 1100 55.95 2023-03
123 2023-04-01 2023-04-30 1100 55.95 2023-04
123 2023-05-01 2023-05-31 1100 55.95 2023-05
123 2023-06-01 2023-06-30 1100 55.95 2023-06
123 2023-07-01 2023-07-31 1100 22.90 2023-07
123 2023-08-01 2023-08-31 1100 22.90 2023-08
123 2023-09-01 2023-09-30 1100 22.90 2023-09
123 2023-10-01 2023-10-31 1100 22.90 2023-10
123 2023-11-01 2023-11-30 1100 22.90 2023-11
123 2023-12-01 2023-12-31 1100 22.90 2023-22
123 2024-01-01 2024-01-31 1100 22.90 2024-01
123 2024-02-01 2024-02-05 1100 22.90 2024-02
I would like to do this in MySQL or ETL data flow if possible. Thanks in advance!
Best Answer
-
I walk through how to do this in this video:
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.1
Answers
-
I walk through how to do this in this video:
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.1 -
Thank you MarkSnodgrass, appreciate it and I will go over the video tonight!
0
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 295 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 97 SQL DataFlows
- 608 Datasets
- 2.1K Magic ETL
- 3.8K Visualize
- 2.4K Charting
- 710 Beast Mode
- 50 App Studio
- 39 Variables
- 668 Automate
- 170 Apps
- 446 APIs & Domo Developer
- 45 Workflows
- 7 DomoAI
- 33 Predict
- 13 Jupyter Workspaces
- 20 R & Python Tiles
- 391 Distribute
- 111 Domo Everywhere
- 274 Scheduled Reports
- 6 Software Integrations
- 116 Manage
- 113 Governance & Security
- Domo Community Gallery
- 31 Product Releases
- 9 Domo University
- 5.3K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 103 Community Announcements
- 4.8K Archive