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.
Hi,
I'd like to solve the following problem:
I need to show a line chart that shows 3-7 number of lines and the number of lines shown should depend on which option you choose from the slicer on the top (Basket). If you choose BASKET_3, then I should see the 3 lines as in the picture. But if I pick BASKET_1, I should see 4 different lines representing other 4 different fields in the data. Is there a way to get this work? I've been struggling with it for so long....
Thank you!!
Hi @Anonymous ,
Please provide a sample .pbix file and I'll try to realize the idea.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The trick is to have the new table include rows for Fund Performance (Line Type) because that is the Legend breakdown in the line chart.
Proud to be a Super User! | |
Yes you are right! But I have 2 fields to put into the chart: one is the fund performance and the other one is the basket performance. I need to put these 2 measures into the chart and also a legend (line type). And I cannot put a legend into the chart if I have 2 variables in the Values. So having the basket performance in the chart does not allow to use legend. What I did so far is creating 2 seperate chart and making them overlap each other but it is not perfect.
@Anonymous , are you trying to change the legend. If so refer if this can
Dynamically change chart axis in Power BI
https://www.youtube.com/watch?v=6jeSIRpjv0M
https://datamonkeysite.com/2020/10/22/change-dimension-dynamically-using-parameter-in-powerbi/
or use bookmarks
https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive
Thank you, I think the bookmarks will help!
Try this:
Create a new table (Enter Data) with two columns: Basket and Line. Have one row for each Line, and assign each Line to a Basket. Now relate this table to your data table on Line Type. Next, add a slicer to the page on Basket.
By selecting a single Basket, you will effectively filter the data table for only those Lines that are in that Basket.
Hope that helps.
Proud to be a Super User! | |
Thank you, but then I would have all the possible lines in the labels, even though they would not appear in the chart, am I right?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
98 | |
78 | |
65 | |
60 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |