Joining Weekly And Monthly Data In ETL
Hello,
I have a data set that holds labor hours and wages for positions broken down by day of week. So for example, there are columns for Sunday through Saturday. Position 1 will have 0 hours in Sunday and Saturday columns and 8 hours in Monday through Friday columns. There is also a budgeted hourly wage. So what I can get is total hours * wage for budget per week. I want to see if I can find a way to join this to a dataset that is aggregated monthly.
I am aware I can figure out the number of days in a month and divide by 7 to get "Number of Weeks" in the month and then multiply that by total hours in a week. Unfortunately, since each position has varying budget hours on each day of the week, that wouldn't get me the exact number i'm looking for.
I'm currently brainstorming a solution for this, but wanted to go ahead and post here in case anyone already has a good solution.
Thanks in advance for any assistance offered!
Best Answers
-
@JakeWright Does your dataset include a date column for the first day of the week? If so, I would recommend using an Unpivot tile in MagicETL to turn your day of week columns into separate rows. Then you can use a formula tile to derive each individual date by adding a certain number of days to the Week Start Date based on the value in the Day of Week column you got from unpivoting. Once your data is in a daily format, then you can use Domo's native date functions to group those dates by Month.
0 -
You can use the Date Dimension dataset and join your hours and wages dataset based on the day of the week, then you can use the year and month values in the date dimension dataset to aggregate on a monthly basis.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
- Can you provide a small example simulating your data?
Aggregate Daily Data to Monthly Level
Use the transformation capabilities in Domo to aggregate the daily labor hours and wages data to the monthly level. This involves using the Group By function to group the data by month and then using the Sum function to sum up the total hours for each month. This step will give you a new dataset where each row represents aggregated data for a specific month.
- Join with Monthly Aggregated Set
Once you have the monthly aggregated data from step 1, you can join this dataset with your existing monthly aggregated dataset. This join will allow you to combine the aggregated daily data with any other existing aggregated data you have, such as monthly sales or expenses.
- Add Calculated Fields
After joining the datasets, you can add calculated fields as needed. For example, you can multiply the total hours by the budgeted hourly wage to calculate the total wages for the month.
** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0 - Can you provide a small example simulating your data?
Answers
-
@JakeWright Does your dataset include a date column for the first day of the week? If so, I would recommend using an Unpivot tile in MagicETL to turn your day of week columns into separate rows. Then you can use a formula tile to derive each individual date by adding a certain number of days to the Week Start Date based on the value in the Day of Week column you got from unpivoting. Once your data is in a daily format, then you can use Domo's native date functions to group those dates by Month.
0 -
You can use the Date Dimension dataset and join your hours and wages dataset based on the day of the week, then you can use the year and month values in the date dimension dataset to aggregate on a monthly basis.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
- Can you provide a small example simulating your data?
Aggregate Daily Data to Monthly Level
Use the transformation capabilities in Domo to aggregate the daily labor hours and wages data to the monthly level. This involves using the Group By function to group the data by month and then using the Sum function to sum up the total hours for each month. This step will give you a new dataset where each row represents aggregated data for a specific month.
- Join with Monthly Aggregated Set
Once you have the monthly aggregated data from step 1, you can join this dataset with your existing monthly aggregated dataset. This join will allow you to combine the aggregated daily data with any other existing aggregated data you have, such as monthly sales or expenses.
- Add Calculated Fields
After joining the datasets, you can add calculated fields as needed. For example, you can multiply the total hours by the budgeted hourly wage to calculate the total wages for the month.
** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0 - Can you provide a small example simulating your data?
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 57 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive