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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
DavidK
Frequent Visitor

Power Query - webcontent

Hellou, i have downloaded data (json data) from web into power bi (import data source) and when i combine two and more table from these sources in power query => these source want to connect to web sources and again donwload data, but when i do it in powe r bi with function UNION - these sources don ´t want to connect....could somebody explain it to me. Thank you in advance.

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

Right, in DAX, the data is already loaded into the model so no need to go get the data. Power Query is all about loading data into the model so it tends to reach out to the source data.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
Greg_Deckler
Super User
Super User

Right, in DAX, the data is already loaded into the model so no need to go get the data. Power Query is all about loading data into the model so it tends to reach out to the source data.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Greg, can you please indicate how to achieve this with DAX, or point me at a link that does. I have the same issue of getting WebContent in Power Query that breaks my sync while trying to get user profile images from O365, so I want to move that to DAX to prevent the refresh failure.

 

This is what I use in PowerQuery

= Table.AddColumn(#"Added O365 Account", "Profile Image", each Web.Contents("https://outlook.office365.com", [RelativePath="/ews/Exchange.asmx/s/GetUserPhoto", Query=[email=[O365], size="HR120x120"]]))

= Table.TransformColumnTypes(#"Added Profile Image",{{"Profile Image", type text}})

= Table.TransformColumns(#"Changed Binary to Text", {{"Profile Image", each "data:image/jpeg;base64, " & _, type text}})

= Table.ReplaceErrorValues(#"Added Prefix", {{"Profile Image", "https://via.placeholder.com/100x100.jpg?text=No+Image"}})

@Juliecal73 - DAX cannot retrieve data. DAX just creates columns, measures and tables from existing data.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Okay, so are there any suggestions of other ways way around it?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.