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.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 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