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
Anonymous
Not applicable

Tooltip to show totals for Stacked Bar chart by excluding the grouping used in legend

Hi,

I am trying to show tooltip for Stacked Bar chart, i.e I have Unit types  A,B,C,D,E,F,G,H,I,J,Others.

And have a another grouping(time period) which I am using in legend 0-30, 31-60, 61-90,....

I want to show in the tooltip the total each Unit Type, but in the tool tip it is showing the total for each Unit type and time period, please see the image below

 

Test.jpg

In the above image, Current units is the units by Type and Time period, I have created a measure Test Totals to get the totals for each type by using all except.

 

But the problem now is if I filter the page with other filters, the measure test Total doesn’t give me the filtered values instead it still gives me the same total.

 

Could anybody please help me in this regard?

 

Thanks in Advance

3 REPLIES 3
parry2k
Super User
Super User

@Anonymous try this measure

 

Tooltip = 
VAR __t = MAX( 'Table'[Unit Types] ) 
RETURN 
    CALCULATE( 
        SUM( 'Table'[Amount] ),
        ALLSELECTED( 'Table'[Time Period] ), 
        'Table'[Unit Types] = __t
    )


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Hi @parry2k ,

 

Thanks for your suggesstion,

 

But it returned the same value as my Current Units.

 

 

@Anonymous can you share sample dataset and your data model. I expected it to work, may be I'm missing something.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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.