Convert quarterly rows into monthly rows

zach9208

Board Regular
Joined
Dec 15, 2015
Messages
117
I have a table called master that has records stored at a quarterly level ie. each record has a fndng_dt=1Q2017, 2Q2017, 3Q2017 ect.

I need to take each record and triplicate each record with the same data and stamp the appropriate fndng_mo_dt based on the fndng_dt field. For example, a row with fndng_dt=1Q2017 would need need two new rows added and I need the fndng_mo_dt to show as 01, 02, 03 respectively across these three records. In addition, I have a field called wgtd_sls_calc_amt in this table and I need to equally allocate this amount to the new 2 rows.

I am looking for suggestions on how to best do this. I am hoping I can do this in a query but the only way I can think of doing it is with a new table where I append the original data 3x times to get the extra rows. After that, I am still unsure how I can get each row to correctly stamp the fndng_mo_dt to each of the 3 rows based on what is in the fndng_dt field.

Any suggestions or ideas?
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Try...

Create a mapping table with the left two characters of the quarter date (1Q, 2Q, 3Q...). In column 2 of this table, put the months that go with each. In column 3, you can put 1/3 (this can be fancier using counts and subqueries, but for now you know that there are only 3 months per quarter. To summarize, this table will have 12 rows and 3 columns: qtr, month_no, column_3_fraction.

After you have completed the table, create a query joining the two tables on left(yourtable.fndng_dt, 2) = mappingTable.qtr. Add a calculated field: calcFld = yourtable.Wgtd_sls_calc * mappingTable.column_3_fraction.
 
Upvote 0

Forum statistics

Threads
1,224,024
Messages
6,175,976
Members
452,692
Latest member
Emy12

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top