web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Dataverse import excel...
Power Apps
Unanswered

Dataverse import excel, power query - add column from different table and repeat in all rows of another table (tables are not related)

(0) ShareShare
ReportReport
Posted on by

I need to import an Excel spreadsheet. It has a main data range tbl_data and a separate header range tbl_header. I want to use dataflow to import tbl_data but insert 5 columns that repeat values from the first (and only) row of data in tbl_header.

 

e.g. tbl_header = 

 

BLCodeClaimMonthClaimYearCategory
B344March2022UC

 

tbl_data contains main data = 

 

IDSurnameForename 
1BlahTest 
2FooBlaaah 

 

I want = 

IDSurnameForenameBLCodeClaimMonthClaimYearCategory
1BlahTestB344March2022UC
2FooBlaaahB344March2022UC

 

How easy is this? Would've taken me seconds in SQL 😞

 

Thanks

I have the same question (0)
  • Cam Profile Picture
    185 on at

    hello @Anonymous 

     

    You can do this with a Function.

    beware - you need to separate your Extract / Load queries, so that you don't trigger the formula firewall.

     

    Here's my example in Excel using Power Query (Dataflows method will work in the same or a very similar way)

     

    Cam_0-1673326689813.png


    Get Headers function - returns the Extract Headers query table

    Cam_2-1673326808890.png


    Extract Headers query - extracts your header data

    Cam_3-1673326858655.png

     

    Extract Data query - extracts your data data

     

    Load Header query - references the extract header query

     

    Load Data query - references the extract data query


    Transform Data query - references the load data query, and calls the get headers function.

    Cam_1-1673326742622.png


    i hope this helps.
    workbook attached

  • Cam Profile Picture
    185 on at

    ohh. it turns out there is an even easier way..
    you do a cross join
    https://learn.microsoft.com/en-us/power-query/cross-join

     

    you just add a custom column to your data table, and reference the header table in that custom column... done!

     

    cant believe this is all that is required...wow Power Query is awesome 😄

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard