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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Slicer to show selected query in a graph?

Hi all,

 

I have 8 csv files (each for a different country) with two columns, date and price. I want to make a simple column chart x-axis=date and y-axis=price. Wondering if I can use a slicer so it only shows the values for the country selected.

 

I've done this before where all the countries and data are in a single csv file, using measures with FILTER and SELECTEDVALUE. But was wondering if there was another way if they are in seperate queries, without having to merge them or do something like bookmarks.

 

Thanks!

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

Combining all of the countries into one table in the query editor is probably the best solution. You could do it with some sort of switching measure but that's more work than consolidating your data.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous,

As AlexisOlson said, you can try to combine these CSV files if they have similar data structures.

If you want to clarify where these records are from, you can add a custom column to these files before combining operations to remark the source file name.

After these steps, you can use the 'source filename' field to create a slicer/filter to control which records are displayed.
Regards,

Xiaoxin Sheng

AlexisOlson
Super User
Super User

Combining all of the countries into one table in the query editor is probably the best solution. You could do it with some sort of switching measure but that's more work than consolidating your data.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.