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
Sasha
Helper III
Helper III

Filtering source in Power Query

Hi,

I have a table of countries and their cities.

I load it to new query in Power Query.

Is there a way to load only a data of particular country?

I don't mean filtering in Power Query but to get filtered data in the first place as part of the source.

Thanks in advance

1 ACCEPTED SOLUTION

Hi @Sasha ,

 

I got your point, but it's doable in SQL , but unable in CSV.

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

View solution in original post

6 REPLIES 6
v-diye-msft
Community Support
Community Support

Hi @Sasha ,

 

Not quite sure about your requirement, do you mean rank countries by setting particular one as the first?

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
vivran22
Community Champion
Community Champion

@Sasha 

 

Hi,

 

What is the data source?

 

Rgds,

Vivek

The source is csv file with one column being a country and the other being a city (countries and all its cities).

I want to be able to load the data to a new query already filtered on a country of my choice and not filtering in Power Query when all data is already loaded.

Hi @Sasha ,

 

I got your point, but it's doable in SQL , but unable in CSV.

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

Thanks!

If SQL used - how I can set the country to be filtered as a parameter?

vivran22
Community Champion
Community Champion

@Sasha 

 

You may follow the link below:

 

Using Parameters in Power BI

 

Besides, in case of your orignal requirement, you can use SQL query under Advanced options (while connecting with SQL Server database).

 

Rgds,

Vivek

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.