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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. 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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.