cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
excelmjr Regular Visitor
Regular Visitor

Only import SQ tables with data into individual queries

I have queried a database. I have used the Table.IsEmpty in a if statement. Thus restricting my data pull to only tables that actually contain data. (Also, if a new table is used it will show up on the next refresh). My question is, how do I tell Power BI to import each table as a separate query?  I do NOT want them all merged together.

let
Source = Sql.Database("server", "database", [CreateNavigationProperties=false]),
#"Added Custom" = Table.AddColumn(Source, "Custom", each if Table.IsEmpty([Data]) then "Empty" else "Has Data"),
#"Filtered Rows" = Table.SelectRows(#"Added Custom", each ([Custom] = "Has Data")),
#"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Custom", "Kind"})
in
#"Removed Columns"

 

I appreciate any suggestions

 

 

1 REPLY 1
Highlighted
Community Support Team
Community Support Team

Re: Only import SQ tables with data into individual queries

Hi @excelmjr,

 

>>My question is, how do I tell Power BI to import each table as a separate query?

Nope, current power query not contains these features, I think you need to manual add them to new queries.

 

Regards,

Xiaoxin Sheng

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



For learning resources/Release notes, please visit: | |