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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Change Measure in Line Chart dynamically on multiple filter selection

Hello everyone, 
I'm struglling to reach to the solution for changing Measures dynamically in a line chart. 
I have Yearly Net Sales and Yearly Plan. I'm showing month trend for both net sales and plan and previous year net sales, for reference see the below screenshot:

rishabh2808_0-1675230665000.png


The user wants to dynamically choose the measure lines in this chart. 

For example: If the user wants to see last 3 years net sales then he has the option to select multiple years and net sales is shown for multiple years. This I have achieved by following a post where I added Year as Legend and gave a filter selection for the same. 
For reference see the below screenshot: 

rishabh2808_1-1675230936610.png

 


 
Problem Statement:   Now the problem is I have created these in two different chart is there any way to combine these two charts in one and add a filter which contains year values and Plan, so if user selects years then he is able to see the yearly net sales and if he chooses plan from that filter the same charts adds a line for the plan and on multi select he should be able to see Yearly net sales and plan if selected. 

Approach Used : I created a What if field parameter and included year and plan and used it as a legend, it works but only on single selection if use multi select then only last selected value is shown in the chart. 

0 REPLIES 0

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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