Forum Discussion
Limit import based on date
- 8 years ago
select filter on your date column and then choose parameter as show below in below circle, and select your parameter.
Yes, in Query Editor under source, then under advanced you can write and SQL statement to only pull in fields you want and put limits on such as dates. Really helps limit the amount of data you can pull in.
Hi Kattlees,
I have a simillar problem of restricting the number of rows while importing the data from SQL server to power bi using Import connection .
I have seen the code for limiting the records from the thread and tried the same but it is showing error.I could not understand the error.
Below is my code.
let
Source = Sql.Databases("ejazah-live-rds.c52bhszlapad.ap-south-1.rds.amazonaws.com"),
EjazahLive = Source{[Name="EjazahLive"]}[Data],
dbo_tb_SalesData = EjazahLive{[Schema="dbo",Item="tb_SalesData"]}[Data]
FilteredRows = Table.SelectRows(dbo_tb_SalesData, each Date.Month([booking_date])=3)
in
FilteredRows
booking_date is adatetime field in the database.
Your help is much appreciated!
Thanks
Lavanya