- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

how to display multiple data series on one chart controlled by a slicer?
Hi
I have 3 separate data sources (using DirectQuery) that I want to plot on the same chart. I am using a bar chart. I would like to have a slicer that lets me select which series to display. If I pick data source 1 on the slicer then data source 1 is displayed. If I pick data source 2 on the slicer then data source 2 is displated. How can I do this?
Thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Create a table with the names of your data sources
DataSourceSelector =
DATATABLE(
"DataSource", STRING,
{
{"Data Source 1"},
{"Data Source 2"},
{"Data Source 3"}
}
)
Create a measure
SelectedData =
SWITCH(
SELECTEDVALUE(DataSourceSelector[DataSource]),
"Data Source 1", SUM('DataSource1'[Value]),
"Data Source 2", SUM('DataSource2'[Value]),
"Data Source 3", SUM('DataSource3'[Value]),
BLANK()
)
Add the shared axis (e.g., Date or Category) to the X-axis.
Add the SelectedData measure to the Y-axis.
Use the DataSourceSelector table as a slicer. When you select a data source in the slicer, the SelectedData measure dynamically adjusts to display data from the corresponding data source.
💌 If this helped, a Kudos 👍 or Solution mark ✅ would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Create a table with the names of your data sources
DataSourceSelector =
DATATABLE(
"DataSource", STRING,
{
{"Data Source 1"},
{"Data Source 2"},
{"Data Source 3"}
}
)
Create a measure
SelectedData =
SWITCH(
SELECTEDVALUE(DataSourceSelector[DataSource]),
"Data Source 1", SUM('DataSource1'[Value]),
"Data Source 2", SUM('DataSource2'[Value]),
"Data Source 3", SUM('DataSource3'[Value]),
BLANK()
)
Add the shared axis (e.g., Date or Category) to the X-axis.
Add the SelectedData measure to the Y-axis.
Use the DataSourceSelector table as a slicer. When you select a data source in the slicer, the SelectedData measure dynamically adjusts to display data from the corresponding data source.
💌 If this helped, a Kudos 👍 or Solution mark ✅ would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @mj2024 ,
As Ibenllin said, field parameters are a good choice. Refer to the demo below:
For more details, you can refer to below bolg:
Power BI Field Parameters: What Are They & How to Use Them?| Coupler.io Blog
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

You do that with Field Parameters.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

do you have a resource that shows how to do it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
05-27-2024 02:45 AM | |||
Anonymous
| 06-28-2024 12:43 AM | ||
07-03-2024 03:10 AM | |||
05-24-2024 03:33 AM | |||
08-07-2023 11:43 AM |
User | Count |
---|---|
86 | |
82 | |
42 | |
40 | |
35 |