Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I have a .pbix file with mixed storage i.e both import as well as direct query tables. Few of my tables in import mode are very huge containing millions of records. Loading all the data in powerbi from these tables affects the speed of .pbix file. I want to enable query folding to fetch only past 3 months data in the .pbix file. However, the caviat is that the datetime columns are of data type nvarchar.
If I change the data type to datetime in query editor it disables the query folding feature. I am looking for suggestions to enable query folding and fetch only past 3 months data using nvarchar type datetime column. Please let me know if it is possible and how?
Thanks,
Sonakshi
Hi @sonam7
Please change the datetime columns on the SQL Server database (or other source) to datetime type instead of nvarchar.
It doesn't support to change the column type in Power BI Desktop side when query folding.
You could also pass parameter in the connnection to limit data imported into Power BI.
Please share datetime columns format with me so i can have a test.
https://www.excelguru.ca/blog/2016/04/28/pass-parameters-to-sql-queries/
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.