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
visheshjain
Solution Supplier
Solution Supplier

Gateway Issue

Hello everyone,

I am having issue configuring gateway for my file.

I have a folder which has different departments, each department has a folder with date and that folder has the files, which append.
E.g.
Department > 11th June 2020 > File1, File2, File3

I have defined a function to get the file and run ETL on it. Here is my function:

 

 

(filepath)=>
let
    Source = Excel.Workbook(File.Contents(filepath), null, true),
    Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
    #"Removed Columns" = Table.RemoveColumns(Sheet1_Sheet,{"Column6", "Column7"}),
    #"Removed Top Rows" = Table.Skip(#"Removed Columns",2),
    #"Transposed Table" = Table.Transpose(#"Removed Top Rows"),
    #"Merged Columns" = Table.CombineColumns(#"Transposed Table",{"Column1", "Column2"},Combiner.CombineTextByDelimiter(" ", QuoteStyle.None),"Merged"),
    #"Trimmed Text" = Table.TransformColumns(#"Merged Columns",{{"Merged", Text.Trim, type text}}),
    #"Transposed Table1" = Table.Transpose(#"Trimmed Text"),
    #"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table1", [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Date", type date}, {"Ref. No.", type text}, {"Party's Name", type text}, {"Claim No", type text}, {"Opening Amount", type number}, {"Final Balance", type number}, {"Overdue by days", Int64.Type}}),
    #"Filtered Rows" = Table.SelectRows(#"Changed Type", each [Final Balance] > 50),
    #"Filtered Rows1" = Table.SelectRows(#"Filtered Rows", each ([Date] <> null))
in
    #"Filtered Rows1"​

 

 


Here is the issue and this is the error I am getting configuring gateways.

 

temp.png


From the error I can see that the command in my function File.Contents is creating a problem, but I don't know how to replace the command and get this working.

Time is of the essence, so any help is welcome.

Thank you,

Did I answer your question?
If yes, then please mark my post as a solution!

Thank you,
Vishesh Jain

Proud to be a Super User!



1 REPLY 1
v-yiruan-msft
Community Support
Community Support

Hi @visheshjain ,

Currently schedule refresh will not work in Power BI Service when use function. You can refer the workaround in the following threads and check if it can resolve your problem.

Schedule Refresh of Excel files in folder

Best Regards

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

Top Solution Authors
Top Kudoed Authors