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
ebtk333
Regular Visitor

Dynamic inclusion of datasets from an online source

Hi,

 

I am working on a report that extracts data automatically from excel files uploaded to a webpage. Once a new excel file was uploaded to a specific webpage of my interest, I refresh the report via Power Bi Desktop and info included in the new excel file is incorporated together with old excel files that were previously uploaded to that webpage and then incorporated in the power bi report. This is possible because excel files are uploaded to a table in a webpage that power bi can catch.

 

Currently I am using the below formula to remove top 2 rows as they are not of interest and table starts in row 3.

(table) =>

let

    Source = table,

    #"Removed Top Rows" = Table.Skip(Source,2),

 Row 1 has text and row 2 is blank, in row 3 usually starts the table’s header.

 

Now this month there was an extra row hidden, whereby row 1 has text, rows 2&3 are blank and row 4 contains the table’s header instead of row 3.

 

Would anyone know how to overcome introduce condition to this formula, which would ask to skip first 2 rows if row 3 has text and skip first 3 rows if 3rd row is blank?

 

Thank you!

1 REPLY 1
v-qiuyu-msft
Community Support
Community Support

Hi @ebtk333,

 

You can remove these blank rows firstly then remove the row 1 which has text:

 

table) =>

let

    Source = table,

    #"Removed Blank Rows" = Table.SelectRows(Source, each not List.IsEmpty(List.RemoveMatchingItems(Record.FieldValues(_), {"", null}))),

    #"Removed Top Rows" = Table.Skip(#"Removed Blank Rows",1),

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
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.