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.
I have a stacked bar graph which displayes processes based on a filter. There are legend labels for all types of processes. However, for some filters, some processes will not show up.
To illustrate, suppose I have 5 processes that I want to show on the stacked bar. So, there are 5 labels in the legend. Suppose, I have two types of patients. For type 1, only three processes are relevant.
Is there a way to show only those relevant labels when I select patient type 1?
Solved! Go to Solution.
Click on the down-arrow in the field you want to change in the Visualizations pane, and deselect Show items with no data.
https://powerbi.microsoft.com/en-us/guided-learning/powerbi-learning-3-11c-display-empty-categories/
This should not be marked as a solution. In every graph I've checked this alleged option does not exist.
Check out this technique on dynamic categories. Seems like it might be applicable to your requirement.
https://community.powerbi.com/t5/Desktop/Dynamic-Category-Using-a-Slicer/td-p/216971
This is somewhat in the line of what I was looking for but not quite. If there is a switch in the legend option that turns the labels off if no data, would be great.
Click on the down-arrow in the field you want to change in the Visualizations pane, and deselect Show items with no data.
https://powerbi.microsoft.com/en-us/guided-learning/powerbi-learning-3-11c-display-empty-categories/
This sounds like a solution but for the stacked bar graph, this option doesn't show up. I do not see the option. Also, please note, the elements are Measures. I've tried with the raw data element, and it still does not have that option.
You need to take advantage of the Legend field.
These are calculated measures and cannot be added to the Legend pane. Could you point me to a resource that shows how I can utilize the legend field in this situation? Thanks.
To use Legend, at most one measure can be added to Value.
I have more than one measure in the value field as I am dealing with stacked bar graph.
I am not aware of such a switch.
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 |
---|---|
114 | |
97 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |