Forum Discussion

Ganesh31's avatar
Ganesh31
Frequent Visitor
3 years ago

How change source from SQL (Direct Query) to Excel of a power bi Report

Hi Experts,

I created a power bi report with sql as a source (direct Query) in which advance editor code is shown as below:

 

let
Source = Sql.Databases("SCPHYDWLP00"),
Plant = Source{[Name="Plant"]}[Data],
dbo_PET = Plant{[Schema="dbo",Item="PET"]}[Data]
in
dbo_PET

 

now i want to change the source to excel which is in my One drive,

Path  : "C:\Users\XXXX\OneDrive - XXXXXX\Plant Operations\PLANT OPERATIONS 2 (EXCEL X FORM) .xlsx"

 

Please suggest me the way to modify advance editor code such that Power bi report source should change from sql to excel.

 

Thanks

1 Reply