Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
mterry
Helper V
Helper V

Duplicating rows with udpated data in Power Query

I'm trying to create a dataflow with power query for currency conversion rates. I have an excel file that has the rates I need, the issue is that the rates for the current month aren't updated until the end of the month and sometimes they're needed before that. What I'm trying to do is to use the rates for the latest month until they actually get finalized. So I'd like to duplicate all rows for the last month in the file, update the month columns by one month and keep the rates the same. Here's a sample of the data now:

 

Currency CodeFXDate_EoM     Date_BoM
AED0.251780930999999996/30/2024     6/1/2024
ANG0.516227868999999956/30/2024     6/1/2024
ARS0.00107883400000000016/30/2024     6/1/2024
AUD0.608499028999999976/30/2024     6/1/2024
AWG0.516572868999999996/30/2024     6/1/2024
BGN0.511291999999999976/30/2024     6/1/2024

 

And here's what I would like it to look like:

 

Currency CodeFXDate_EoM     Date_BoM
AED0.251780930999999996/30/2024     6/1/2024
ANG0.516227868999999956/30/2024     6/1/2024
ARS0.00107883400000000016/30/2024     6/1/2024
AUD0.608499028999999976/30/2024     6/1/2024
AWG0.516572868999999996/30/2024     6/1/2024
BGN0.511291999999999976/30/2024     6/1/2024
AED0.251780930999999997/30/2024     7/1/2024
ANG0.516227868999999957/30/2024     7/1/2024
ARS0.00107883400000000017/30/2024     7/1/2024
AUD0.608499028999999977/30/2024     7/1/2024
AWG0.516572868999999997/30/2024     7/1/2024
BGN0.511291999999999977/30/2024     7/1/2024

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @mterry ,

 

Thanks for the reply from @aj1973 , please allow me to provide another insight: 

 

1. Filter last month’s data in power query.

vkaiyuemsft_0-1721985306361.png

 

2. Copy the current table and modify the column names of the two columns of dates.

vkaiyuemsft_1-1721985316002.png

 

3. Create custom column.

vkaiyuemsft_2-1721985327912.png

 

vkaiyuemsft_3-1721985342756.png

 

vkaiyuemsft_4-1721985350552.png

 

4. Remove unnecessary columns.

vkaiyuemsft_5-1721985390914.png

 

5. Append the copied table to the original table.

vkaiyuemsft_6-1721985404662.png

vkaiyuemsft_7-1721985412217.png

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @mterry ,

 

Thanks for the reply from @aj1973 , please allow me to provide another insight: 

 

1. Filter last month’s data in power query.

vkaiyuemsft_0-1721985306361.png

 

2. Copy the current table and modify the column names of the two columns of dates.

vkaiyuemsft_1-1721985316002.png

 

3. Create custom column.

vkaiyuemsft_2-1721985327912.png

 

vkaiyuemsft_3-1721985342756.png

 

vkaiyuemsft_4-1721985350552.png

 

4. Remove unnecessary columns.

vkaiyuemsft_5-1721985390914.png

 

5. Append the copied table to the original table.

vkaiyuemsft_6-1721985404662.png

vkaiyuemsft_7-1721985412217.png

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Thank you that's exactly what I needed. 

aj1973
Community Champion
Community Champion

Hi @mterry 

With Dataflows gen 2 you can achieve it 

https://learn.microsoft.com/en-us/fabric/data-factory/dataflow-gen2-data-destinations-and-managed-se...

Incremental refresh can do it too

Other easy option is to add a new colonne in your Excel file to insert a Timestamp for changes.

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Bumping this back up as the response doesn't solve my issue. 

I'm not certain that link helps with the specific problem unless I missed something? I don't need a timestamp for changes, I'm hoping to copy some of the existing rows and append them to the existing table with an updated date. 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.