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

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.

Reply
shinney
Helper I
Helper I

Making a bar chart with y-axis up to 100%, but don't want entire bar

Hello,

I've been trying to make a bar graph, with the y-axis up to 100%. data is something like this:

LocationStatus% of Status Total
ANot Started50%
AIn Progress50%
ACompleted0%
BNot Started100%
BIn Progress0%
BCompleted0%
CNot Started25%
CIn Progress25%
CCompleted50%


The purpose is to see the % of each category, but I only want to see only the "In Progress" and "Completed" categories. However, everytime I filter out the data, the bar fills up to 100% again, ratios adjusted.

 

Eg. If I filter out Not Started, location A's bar would be 100% In progress. I want it 50% In progress (bar should be half the size). Location B's bar should be empty, Location C should be 3/4 filled.


I tried using both the "100% stacked column chart" and "stacked column chart", neither works. 

 

Right now, I made it so the data colour for Not Started = white as a temporary solution. However, it still shows up in the legend, and only works because alphabetically, it's last on the list, so the data colours don't float. I'll need a proper solution. 

Anyone have any advices? Thanks!

4 REPLIES 4
v-shex-msft
Community Support
Community Support

Hi @shinney,

Can you please share a pbix file with some dummy data(keep similar data structure) and expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
shinney
Helper I
Helper I

I noticed where the problem is, it's in my measure, a % calculation. (Might need to create new post)

Basically, when I filter out the status, the % changes accordingly, so it reflects on the graph. I noticed this when I started using a table visual and saw the interaction. 

 

What would be the best way to calculate the % in each group so it remains the same %s regardless of slicer?

 

Here's the current measure:

% of Status = ((count('Revised Data'[Overall Status]))/CALCULATE(count('Revised Data'[Overall Status]),ALLSELECTED('Revised Data'[Overall Status])))

Try ALL instead of ALLSELECTED if you don't want the slicer to control the denominator.

AlexisOlson
Super User
Super User

A regular stacked column chart should work fine.

 

AlexisOlson_0-1618948602293.png

 

You don't what the 100% version because of the rescaling like you mentioned.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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