Forum Discussion
Get data from specific date range- ODBC
- 4 years ago
Hi, Anonymous ;
In the From ODBC dialog box, expand the Data Source Name (DSN) drop-down list and select the DSN that you’ve configured for your data source. Optionally, you can enter a SQL statement to execute against the ODBC driver in the Advanced options -- for example, if you want to filter or sort the data in the table rather than to load the entire dataset. Click OK. If your data source is password-protected, Power BI will prompt you for the username and password. Type them into the respective fields and click OK.
You could write SQL to filter data.like below:
SELECT * FROM myODBC WHERE year(Date)>=year(getdate())-5SELECT Select DateAdd(yyyy,-3,getdate()) FROM myODBChttps://www.w3school.com.cn/sql/func_datediff.asp
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
That entirely depends on your ODBC source. Does it support native queries?