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

filtering legends of the line chart or any other visual

hi all,
Need help for the following 2 requirements - 

1. I have a line chart with multiple legends. The legends (forecast, production plan etc) are taken from different tables. And the x axis is calendar axis having joins with different tables used as legends
Screenshot below

rohit1410_0-1620652202115.png

I need to dynamically select the legends. And accordingly the chart should change.
Expected result - 

rohit1410_2-1620652868857.png


2. I have a measure that calculates Projected Inventory (PI) =  Production plan - Forecast. 
It should calculate PI based on what I select at the filter.
If I select only Forecast, then PI formula should return ----->Forecast.

If I select Forecast and Production plan, then it should return --->Production plan - Forecast.
Can I have the logic for the same.

let me know if you want any more inputs.

thanks for helping 

 

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @Anonymous ,

Could you please provide some sample data (exclude sensitive data) from the involved tables in the line chart and your expected result with specific examples and the related logic in order to provide you a suitable solution? Thank you.

On the other hand, please review the content in the following links and hope they can help you.

1.  Dyanamic legend

DYNAMIC LEGEND IN #POWER BI VISUAL, LINE CHART

Power BI Dynamic Legend

Dynamically filter legends in a chart based on selection from other chart

 

2.  Dynamic calculation base on slicer selection

DAX - Column content based on slicer selection

Best Regards

Community Support Team _ Rena
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

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi @Anonymous ,

Could you please provide some sample data (exclude sensitive data) from the involved tables in the line chart and your expected result with specific examples and the related logic in order to provide you a suitable solution? Thank you.

On the other hand, please review the content in the following links and hope they can help you.

1.  Dyanamic legend

DYNAMIC LEGEND IN #POWER BI VISUAL, LINE CHART

Power BI Dynamic Legend

Dynamically filter legends in a chart based on selection from other chart

 

2.  Dynamic calculation base on slicer selection

DAX - Column content based on slicer selection

Best Regards

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

@v-yiruan-msft Thanks a lot for providing the relevant links😀. Those really helped

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.