Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
I have a bar chart where the y-axis and legend are attached to field parameters. The values on the x-axis are filtered by a 1/0 measure applied to the chart. The filter is working fine for the bars on the chart. However, the legend is not getting filtered like I would expect, even thought the filter is applied to the whole visual (including the legend). The problem is, the legend is trying to show all of the values of the field (around 225 unique companies in the source table), but Power BI limits the legend to 60 items, which causes the chart to be missing random data. My filter limits the number of companies to exactly 60, but isn't getting applied to the legend. Any ideas on how to apply this filter to the legend as well?
it would probably be better then to build the filter into the measure you are using itself.
Although I do have to say its quite difficult to read all that data with so many legends, even 60 is a lot. is there a better way of doing this maybe?
what are you trying to demonstrate?
Proud to be a Super User!
Agreed, 60 is a lot. It's the big companies that show up on the chart that get highlighted vs. the smaller companies.
My filter is a simple measure that produces a 1 or 0 base on the value on the x-axis, like this:
_Mutual Filter = IF(SUM(Table1[Value]) > 100, 1, 0)
Table1 consists of:
A Company table looks like:
The filter seems to work fine for the chart, but not for the legend.
There is a one-to-many relationship between Company[ID] and Table1[Company ID].
If I put Company Name and _Mutual Filter in a table, I can see that all of the companies come in with a value of 1, which means that the filter isn't getting applied to the list of companies.
I'm trying to figure out how to change my measure to include filtering on the Company Name, but I'm not understanding the row vs. filter context. Is it possible?
I pulled up a table in Power BI with Company ID, Company Name, Value, and _Mutual_Filter. Comparing the list of Company names in the table to the legend, I can see that the _Mutual_Filter does indeed filter the legend, but it's 78 companies rather than 60 that I thought I was calculating the "value" for the filter. So the chart is actually working correctly, and there's something in my calculation of value.
okey dokes, do you need anymore assistance?
Proud to be a Super User!
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
86 | |
85 | |
84 | |
67 | |
49 |
User | Count |
---|---|
131 | |
111 | |
97 | |
71 | |
67 |