Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

Automating one transaction row into four

Hi All - 

 

Bit of a brain teaser for you here. 

I'm building a workbook with power query and power pivot to track transactions for CY and PYs. One of the products I'm tracking is a multiday product (meaning the rev and qty should be even distributed over the four days), but the reporting I use only shows the total revenue on the first day and doesn't include the following 3-days. 

 

I've cleaned the data in one query:

 

I have look-up tables with the related dates for each product:

 

What I need is for everytime a transaction (like in the first image) occurs, all of the data duplicates into three more lines - one for each of the subsequent product_dates as referenced in the lookup table. 

 

Ideally - this is what I'm hoping to get for every one of these product transaction lines:

 

Any thoughts would be appreciated!

 

 

 

 

 

 

1 Reply