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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
jacc14
New Member

Moving dates to end of row in power query

looks like this       
ModelInvoice PriceStandard RRPSOA1SRP1   
START  01/01/202501/01/2025   
END  07/07/202507/07/2025   
item 1145.9939239.99145.39170.99   
item 2152.0773249.99151.4750.99   
item 3145.9939239.99145.39170.99   
item 4152.0773249.99151.4750.99   
item 5310.2439509.99309.64170.99   
item 6364.9939599.99364.39170.99   
item 7486.6606799.99486.05830.99   
item 8194.6606319.99194.05830.99   
        
        
want it to look like this      
ModelInvoice PriceStandard RRPSOA1SRP1STARTEND 
item 1145.9939239.99145.39170.9901/01/202507/07/2025 
item 2152.0773249.99151.4750.9901/01/202507/07/2025 
item 3145.9939239.99145.39170.9901/01/202507/07/2025 
item 4152.0773249.99151.4750.9901/01/202507/07/2025 
item 5310.2439509.99309.64170.9901/01/202507/07/2025 
item 6364.9939599.99364.39170.9901/01/202507/07/2025 
item 7486.6606799.99486.05830.9901/01/202507/07/2025 
item 8194.6606319.99194.05830.9901/01/202507/07/2025 
        
        

 

Hello.  First time user and hoping for some help please.  I have a table above which shows the START and END dates at the top of 2 of my columns.  I have created a copy to show how I would like these to look as want the dates to appear at the end of each row.

 

thanks

jacc14

 

1 ACCEPTED SOLUTION
johnbasha33
Super User
Super User

Hi  

Welcome! You're very close—and this is a classic Power Query (Power BI or Excel) cleanup scenario. You're dealing with header metadata rows (START/END dates) that you want to transform into columns for each data row.

Let me walk you through how to do this step-by-step in Power Query, with a visual result like the one you're aiming for.


🛠️ Step-by-Step Solution in Power Query

1. Load Your Data

  • In Excel: Select your table → Data tab → From Table/Range → Load to Power Query.

  • In Power BI: Use Get Data → Excel → load the sheet/table to Power Query.


    2. Promote Proper Headers

    If your data looks like:

    Row 1: Model, Invoice Price, Standard RRP, SOA1, SRP1
    Row 2: START, , , 01/01/2025, 01/01/2025
    Row 3: END, , , 07/07/2025, 07/07/2025

    Then the actual data starts on row 4, and rows 2 & 3 contain metadata. So:

    • In Power Query: Remove top 1 row → Home tab → Remove Rows → Remove Top Rows → 1

    • Now you’ll see START and END as your first two rows.

    • Select Home > Use First Row as Headers — now your headers are the column names.


      3. Extract START and END Dates

      Create two new custom columns:

      Custom Column: START

      = #"Changed Type"{0}[SOA1]

      Custom Column: END

      = #"Changed Type"{1}[SOA1]

      Replace "Changed Type" with the step name before this one if it differs.

      What this does:

      • {0} = 1st row = START values.

      • {1} = 2nd row = END values.

      • We’re grabbing a representative column (SOA1) assuming dates are same across those columns.


        4. Remove Metadata Rows

        Remove the first two rows (START and END):

        • Right-click on the row indicator (far left) of row 1 and row 2 → Remove.


          5. Fill START and END to All Rows

          • Now you have your new columns (START, END) from earlier.

          • Their values are constant, but only appear once.

          • So: select START and END columns → Transform > Fill Down.


            6. Optional: Reorder Columns

            Move START and END columns to the right of the main data using drag-and-drop in the column header area.

            Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!@jacc14

View solution in original post

2 REPLIES 2
johnbasha33
Super User
Super User

Hi  

Welcome! You're very close—and this is a classic Power Query (Power BI or Excel) cleanup scenario. You're dealing with header metadata rows (START/END dates) that you want to transform into columns for each data row.

Let me walk you through how to do this step-by-step in Power Query, with a visual result like the one you're aiming for.


🛠️ Step-by-Step Solution in Power Query

1. Load Your Data

  • In Excel: Select your table → Data tab → From Table/Range → Load to Power Query.

  • In Power BI: Use Get Data → Excel → load the sheet/table to Power Query.


    2. Promote Proper Headers

    If your data looks like:

    Row 1: Model, Invoice Price, Standard RRP, SOA1, SRP1
    Row 2: START, , , 01/01/2025, 01/01/2025
    Row 3: END, , , 07/07/2025, 07/07/2025

    Then the actual data starts on row 4, and rows 2 & 3 contain metadata. So:

    • In Power Query: Remove top 1 row → Home tab → Remove Rows → Remove Top Rows → 1

    • Now you’ll see START and END as your first two rows.

    • Select Home > Use First Row as Headers — now your headers are the column names.


      3. Extract START and END Dates

      Create two new custom columns:

      Custom Column: START

      = #"Changed Type"{0}[SOA1]

      Custom Column: END

      = #"Changed Type"{1}[SOA1]

      Replace "Changed Type" with the step name before this one if it differs.

      What this does:

      • {0} = 1st row = START values.

      • {1} = 2nd row = END values.

      • We’re grabbing a representative column (SOA1) assuming dates are same across those columns.


        4. Remove Metadata Rows

        Remove the first two rows (START and END):

        • Right-click on the row indicator (far left) of row 1 and row 2 → Remove.


          5. Fill START and END to All Rows

          • Now you have your new columns (START, END) from earlier.

          • Their values are constant, but only appear once.

          • So: select START and END columns → Transform > Fill Down.


            6. Optional: Reorder Columns

            Move START and END columns to the right of the main data using drag-and-drop in the column header area.

            Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!@jacc14

This is great thank you. Works a treat. 

kind regards 

jacc14 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors