Search code examples
powerbilarge-datachunks

download chunks of dataset in Power BI in Direct Query mode


I have a dataset of 13 years stored in an SQL database. I am doing data visualization in Power BI. I want to download 2 years of data so that I can analyze and perform all the operations in Direct Query mode, there are some operations that can not be performed. Is there any way to download 2 years of data out of 13 years in Power BI?


Solution

  • For Direct Query mode, you need to have a data source with some sort of compute capacity, like a SQL Database. You can't download data into Power BI, that would be an import to the PBI file, which basically copies the data from the SQL Database to PBI.

    If you need to use direct query, you have two options. The first is option is, on the SQL Server create a new table(s) that will store the 2 years worth of data for you to query. You then use Power BI to connect to that table.

    The other option is to use direct query to link to the existing table and using the Query Editor filter out the time range you need. This will use Query Folding to generate an SQL query which will filter the data for you. With the correct indexing on the table you should not have an issue with query result times.