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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
cmaier
Advocate I
Advocate I

Trouble with Legend Values

I am very new to PowerBI but thought I had a decent understanding. I am having trouble with one of my legends.  I have successfully created a measure that shows average hours/week in particular category. However, when I add a field to the legend, it RE-iterates the average function based on the week counts for the subcategories as opposed to overall week count. 

 

For example it would show me a total in the subcategory divided by the count of week in which that subcategory was logged, as opposed to divided by all weeks the employee worked.

 

Sorry if that didn't make sense. I've been staring at this all day and my brain is a little fried

2 REPLIES 2
amitchandak
Super User
Super User

@cmaier , Try like

 

calculate(Distinctcount(Table[Week]), removefilters(Table[Category], Table[Sub Category]))

 

Power BI Percent of Total and Percent of SubTotal: https://www.youtube.com/watch?v=cN8AO3_vmlY&t=24270s

 

Or this can help

How to Switch Subtotal and Grand Total in Power BI | Power BI Tutorials| isinscope: https://youtu.be/smhIPw3OkKA

 

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

I will try these and get back to you. I don't know if it will work, but at least it's something I can move forward on.  Thank you.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors