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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
DIACHROMA
Helper II
Helper II

Dynamic slicing line chart based on slicers selection

Hello Power BI Community,

 

I'm working on a dashboard where I have a line chart displaying the evolution of conversion rates over time. I'm looking to dynamically segment this line chart based on the selections from three slicers: Client, Supplier, and Product.

 

Here's my specific requirement:

- By default, the chart should always display a curve for each client, based on client slicer.

- If a selection is made in the Supplier slicer, the chart should display all possible Client/Supplier combinations.

- Similarly, if a selection is made in the Product slicer (but not in Supplier), it should show all Client/Product combinations.

- And, if selections are made in both Supplier and Product slicers, it should display curves for all Client/Supplier/Product combinations.

 

I've identified four scenarios based on the selections:

1. No selection in either Supplier or Product slicers: Display a curve per client.

2. Selection in Supplier only: Display a curve for each Client/Supplier combination.

3. Selection in Product only: Display a curve for each Client/Product combination.

4. Selections in both Supplier and Product: Display a curve for each Client/Supplier/Product combination.

 

To achieve this, I tried creating four columns in my table by concatenating values: client / client+supplier / client+product / client+supplier+product. Then, I created a field parameter and added it to the legend field of my line chart. However, I'm struggling to condition the selection of my parameter based on the other slicers' selections.

 

Is it possible to achieve this dynamic segmentation based on slicer selections? If so, how can it be done? If not, is there another approach that could lead me to the desired result?

 

Any guidance or insights from the community would be greatly appreciated!

 

Thank you in advance for your help!

Pauline

2 REPLIES 2
parry2k
Super User
Super User

@DIACHROMA I'm having a little hard time understanding the requirement. Although you have well explained it, it is me not able to wrap my head around it. Could you share some sample (dummy) data with the expected result?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi @parry2k, thank you for your response.

 

You can download a sample file at this link: https://we.tl/t-dVdkFgLArS. In this example, I'm working with three slicers: Brand, Class, and Channel.

 

The goal is to have different views in the line chart based on the user's selections in these slicers. I've created a separate page for each possible view.

 

Here are the rules:

  1. In the line chart, the default view is to show one line per brand.
  2. If a selection is made only in the Class slicer, the chart should show one line for each Brand/Class combination.
  3. If a selection is made only in the Channel slicer, the chart should display one line for each Brand/Channel combination.
  4. If selections are made in both the Class and Channel slicers, the chart should show one line for each combination of Brand/Class/Channel.

Helpful resources

Announcements
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.