Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Using parameters to filter before import

Hi,

 

I am having the following problem.

 

I have a SQL database with data of different clients. Now my end goals is to make some kind of "template" dashboard in Power BI where I can switch between client data with a Parameter. The tabel has 1.2mil rows spread over 20 clients. 

 

Now when I import the data and manually filter (in the Power Query) the "ClientID" by the clientID that I want, Power BI imports only the data with that specific clientID. Lets say 100k rows.

 

But when I replace the manual filter by a parameter and fill in the same clientID as before Power BI imports 1.2mil rows and then filters the data. This makes my import allot slower. 

This is how my query looks like: 

Mark203_0-1595580890756.png

 

let
Bron = Sql.Database("xxxxx", "xxxxxx"),
dbo_eol_receivablesbulk_r = Bron{[Schema="dbo",Item="eol_receivablesbulk_r"]}[Data],
#"Changed Type" = Table.TransformColumnTypes(dbo_eol_receivablesbulk_r,{{"divisionownercompanynumber", type number}}),
#"Filtered Rows1" = Table.SelectRows(#"Changed Type", each [divisionownercompanynumber] = ClientID)
in
#"Filtered Rows1"

 

So my question is, can I work with parameters where I dont have to import all 1.2mil rows, just the filtered rows?

Thanks!

 

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,

You can refer the contents in following links and use Query Parameters in SQL conditional clauses to filter records:

Dynamic Data Masking and Query Parameters

Pass parameter to SQL Queries statement using Power BI

Best Regards

Rena

Anonymous
Not applicable

Hi @amitchandak,

Thanks for your help. i wonder if this is the solution. Because when I dont use parameters but just filter my data (without parameters) in Power Query, Power BI wont load all the data, just the filtered data.

I see how incremental Load could help with reducing te loading time, it doenst feel like a solution for my problem.

 

 

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.