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 toany 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 toany 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
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 311 Workbench
- 7 Cloud Amplifier
- 9 Federated
- 3K Transform
- 114 SQL DataFlows
- 654 Datasets
- 2.2K Magic ETL
- 4.1K Visualize
- 2.5K Charting
- 803 Beast Mode
- 79 App Studio
- 44 Variables
- 758 Automate
- 188 Apps
- 480 APIs & Domo Developer
- 73 Workflows
- 17 DomoAI
- 40 Predict
- 17 Jupyter Workspaces
- 23 R & Python Tiles
- 408 Distribute
- 119 Domo Everywhere
- 279 Scheduled Reports
- 10 Software Integrations
- 141 Manage
- 137 Governance & Security
- 8 Domo Community Gallery
- 47 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 114 Community Announcements
- 4.8K Archive