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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
mattwoldt
Frequent Visitor

Stacked Bar Chart tool tip to show % of section over the category, not the total

Hello friends!

 

So I'm looking at categories at my job and doing revenue/headcount and we have titles, so for instance:

 

The date would be something along the lines of:

 

TitleActive/Not Active

Vice President

Active
Vice PresidentNot Active
Executive Vice PresidentActive
Senior Vice PresidentNot Active

Executive Vice President

Not Active

Senior Vice President

Active

 

Obviously very basic, but the stacked bar will show those categories and then split the count of who is active and who is not. 

What I'm trying to achieve is when you hover over a section, like the Active Bar, the tool tip will say:

 

Active: 1

% Active: 50%

 

The current way I have it, I keep always getting:

 

Active: 1

% Active: 100%

 

I tried other measures including ALL filter and it still is not working so I am hoping to get some help here!

 

Thank you and let me know if I need to provide anything else. 

2 REPLIES 2
Anonymous
Not applicable

Hi @mattwoldt ,

Please refer to my pbix file to see if it helps you.

Create a measure.

Measure =
VAR _all =
    CALCULATE ( COUNT ( 'Table'[Active/Not Active] ), ALLSELECTED ( 'Table' ) )
VAR _1 =
    CALCULATE (
        COUNT ( 'Table'[Active/Not Active] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[Active/Not Active] = SELECTEDVALUE ( 'Table'[Active/Not Active] )
        )
    )
RETURN
    _1 / _all

vpollymsft_0-1661740089704.png

If I have misunderstood your meaning, please provide more details with your deisred output.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello, 

So I did the measure and I am getting numbers that seem to 100%, but are not displaying the correct calculation somehow:

mattwoldt_0-1661876531080.png

 

As you can see I have 93 in this category of Active and 93 in the other category as inactive. But for some odd reason it is saying .22 for active and .86 for non active?

I used the equation below:


mattwoldt_1-1661876584951.png

 

 

Was there a step in teh calculation that I may have messed up potentially. 

"Loan Status" is the "Active/Not Active", I will say there is another variable mixed in there that is "Active Loans, Not Active Loans and then Termed Loans", but that I naturally have filtered out. 

The specialty table, is the fact table. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.