Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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:
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:
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.
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
11 | |
9 | |
6 |