<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=612681139262614&amp;ev=PageView&amp;noscript=1">
Skip to content

Need help? Talk to an expert: phone(904) 638-5743

Speed up Power BI development time with filters and parameters

Speed up Power BI development time with filters and parameters

Introduction

Have you ever wondered why your Power BI reports are slow during development? If you’re working in the Power Query Editor and every click takes forever, you might be working with too much data. In this blog, Mitchell Pearson from Pragmatic Works shares tips to speed up Power BI development using filters and parameters to limit the amount of data, making your development process more efficient.

 

Limit Data for Faster Development

When working with large datasets in Power BI, it’s essential to work with a subset of your data during development to avoid delays. Instead of loading millions of rows, you can limit the data to a smaller time range or a specific sample. This can drastically speed up the development process, especially when using Power Query Editor.

How to Limit the Data

  • If you're working with Excel or CSV files, create a development version with a smaller dataset, like the last month's data, and point your source to this test file during development.
  • If you're pulling data from a database like Azure SQL, limit the dataset by applying filters in Power Query Editor.

Using Parameters to Filter Data

Parameters are key to managing large datasets efficiently in Power BI. Instead of manually hardcoding filter values, you can create parameters that allow you to modify filter values dynamically. This approach makes the development process more flexible and easier to manage, especially when you’re working with various filters across multiple tables.

Steps to Use Parameters

  • In Power Query Editor, select the table you want to filter.
  • Right-click and choose “View Native Query” to ensure query folding is applied.
  • Apply a filter to reduce the dataset to a manageable size, such as filtering by date or other relevant columns.
  • To avoid hardcoding values, go to "Manage Parameters" and create a new parameter that can be used in the filter.

Example of Filtering Using Parameters

Mitchell provides an example of filtering data by date. If you're working with large transaction tables, filter them by date to limit the amount of data being loaded into Power BI. You can create a parameter that represents the date and use it in multiple places in your report. Once the parameter is set up, you can modify the filter in Power BI Service without having to go back to the Power Query Editor.

Here’s how it works:

  1. Create a parameter for the date filter.
  2. Use this parameter to filter your data in Power Query Editor.
  3. Once set up, you can adjust the parameter value without reopening Power Query Editor, making it easier to adjust your data filtering in the future.

Query Folding for Faster Performance

When reducing the data, make sure query folding is enabled. Query folding means that Power BI pushes the data transformation steps back to the server, rather than doing them locally on your machine. This significantly improves performance, especially when working with large datasets. Make sure to check that query folding is active by right-clicking on the query and selecting "View Native Query".

Benefits of Using Filters and Parameters

  • Reduces the dataset size, improving development speed.
  • Allows for more flexibility when filtering data.
  • Improves performance by offloading work to the server via query folding.
  • Helps avoid time delays in the development process, making it easier to iterate and finalize reports.

Conclusion

By using filters and parameters, you can speed up Power BI development and make your reports more responsive. Whether you’re working with an Excel file or a database, limiting the data during development will save you time and reduce frustration. Don’t forget to use query folding to ensure the transformations happen on the server, not your local machine. These strategies will make a big difference in your Power BI workflow and help you deliver reports faster.

Sign-up now and get instant access

Leave a comment

Free Community Plan

On-demand learning

Most Recent

private training

Hackathons, enterprise training, virtual monitoring