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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Dynamically change line chart using slicers

I want to create a line chart which shows multiple lines. The selection is to be done using a slicer.

Consider the following table: 

Photo123.png

 

I want to give the user options to select the 2 or more dates and accordingly display 2 or more lines like below:

Photo14.png

I have tried making measures or calculated columns but none of them seems to work in the chart.

4 REPLIES 4
Greg_Deckler
Super User
Super User

Is this what you are trying to do? See attached PBIX.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Yes. 

This solves part of my problem.

 

Is there any way I can use 2 fields in the Legends section?

This solves the problem if I have 1 field to choose from (date in this case). If I have 2 or more fields, how will I be able to do it?

hi, @Anonymous 

To my knowledge, It couldn't achieve that use multiple fields on a legend like an Excel pivot chart in power bi for now.

For your requirement, you may vote for the idea here so this feature might be introduced/rolled out sooner.

 

 

Best Regards,

Lin

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

Just use slicers instead of the legend? Tough to say exactly unless you can give me a specific scenario.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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