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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
SjoerdV
Frequent Visitor

Efficient Expand and SelectRows

Hi all,

 

we're testing a connection to our Oracle-DWH and are running some queries. However, they tend to take more than 2 hours because of the amount of data that's being loaded. I suspect it's because it simply loads all data, and then starts removing those records that do not live up to the Filtered Row-arguments.

____

let
Source = Oracle.Database("ewdwhp", [CreateNavigationProperties=false] ),
#"Filtered Rows3" = Table.SelectRows(Source, each ([Schema] = "EWC2_PL")),
#"Filtered Rows2" = Table.SelectRows(#"Filtered Rows3", each Text.Contains([Name], "FACT_DM_TRIPLEG_TRIP_COMB")),
#"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows2",{"Data"}),
#"Filtered Rows" = Table.ExpandTableColumn(#"Removed Other Columns", "Data", {"TL_FILE_NR_ICARE", "TL_TRIPLEG_NR_ICARE", "TL_COMPANY_STRUCTURE_SK", "T_FIRST_TRIPLEG_TRUCK_SK", "T_REPORT_DATE_SK"}, {"TL_FILE_NR_ICARE", "TL_TRIPLEG_NR_ICARE", "TL_COMPANY_STRUCTURE_SK", "T_FIRST_TRIPLEG_TRUCK_SK", "T_REPORT_DATE_SK"}),
#"Changed Type" = Table.TransformColumnTypes(#"Filtered Rows",{{"TL_COMPANY_STRUCTURE_SK", Int64.Type}, {"T_FIRST_TRIPLEG_TRUCK_SK", Int64.Type}, {"T_REPORT_DATE_SK", Int64.Type}}),
#"Filtered Rows1" = Table.SelectRows(#"Changed Type", each [TL_COMPANY_STRUCTURE_SK] = 16602)
in
#"Filtered Rows1"

____

 

I think the solution is somewhere in defining Table.ExpandTableColumn(only those rows where ach [TL_COMPANY_STRUCTURE_SK] = 16602), but with my Google-fu I haven't found the way to do it. 

 

Could you please help me.

 

Edit: Somehow this ended up in Deskstop, can the topic please be moved to the Power Query board?

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @SjoerdV ,

 

Please filter your data before loading by sql statement.

Capture.PNG

 

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

View solution in original post

1 REPLY 1
v-frfei-msft
Community Support
Community Support

Hi @SjoerdV ,

 

Please filter your data before loading by sql statement.

Capture.PNG

 

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

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors