Forum Discussion
BBL
7 years agoFrequent Visitor
Load multiple tables in Power Query
Hello everyone, I'm new to this community so I hope that I got the location right.. New in PowerBI, despite a few hours of research I can not find the solution. I want to load multiple tables f...
v-frfei-msft
7 years agoCommunity Support
Hi BBL ,
We can use DateTime.LocalNow() and Date.AddYears(DateTime.LocalNow(),-1) to work on it. Here I just filter the data by rows in a table for your reference, not tables. M code for your reference.
let
Source = Sql.Databases("localhost"),
Franktest = Source{[Name="Franktest"]}[Data],
dbo_Product = Franktest{[Schema="dbo",Item="Product"]}[Data],
#"Changed Type" = Table.TransformColumnTypes(dbo_Product,{{"SalesDate", type datetime}}),
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each ([SalesDate] <= DateTime.LocalNow() and [SalesDate] >=Date.AddYears(DateTime.LocalNow(),-1)))
in
#"Filtered Rows"
BBL
7 years agoFrequent Visitor
Except the data are not in the same table.
And that's my question, how will I dynamically load the rolling 12 months tables, and daily productions data table TAB?