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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
kofoedandreas
New Member

Excel Import with many to many relationship

Hi, 

I am currently trying to import data from an Excel sheet. I have a huge dataset hosted in Azure (I don't have server credentials), so my only option is to export all entities to an Excel sheet. 

One entity export could look something like: 

 

ID

 

IdNamePositionBodyparts
1John DoeManagerArms
  Legs
  Head
  Torso
2Jane DoeAssistantArms
  Legs
  Torso

 

*Where each body part is a type of the entity (so we have an entity called bodyparts as well).

 

Therefore, the standard import option clearly fails. How do I work around this?

Best,
Tommy

2 REPLIES 2
v-ljerr-msft
Employee
Employee

Hi @kofoedandreas,

 

I'm not sure I can understand your problem totally. Did you receive any error when importing the Excel file.

 

What's your expected result? Is it like below?

 

r2.PNG

let
    Source = Excel.Workbook(File.Contents("C:\Users\user1\Desktop\TestImport.xlsx"), null, true),
    Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
    #"Promoted Headers" = Table.PromoteHeaders(Sheet1_Sheet, [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Id", Int64.Type}, {"Name", type text}, {"Position", type text}, {"Bodyparts", type text}}),
    #"Filled Down" = Table.FillDown(#"Changed Type",{"Id", "Name", "Bodyparts"})
in
    #"Filled Down"

If not, could you post the expected result against the sample data? Smiley Happy

 

Regards

kofoedandreas
New Member

Hi PBI,


I want to import a huge dataset from a data source in Azure, but I don't have the server credentials which is why, I am exporting it all to Excel. 

My problem happens in relation to relationships. Look at the below:

 

IdNamePositionBodyparts
1John DoeManagerArms
  Legs
  Head
  Torso
2Jane DoeAssistantArms
  Legs
  Torso

*The bodypart column is a entity itself and Torso is e.g. a type hereof. 

 

Then, the standard excel import clearly fails. How do I work around this?

Best,
Andreas

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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