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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
keyahorm
Regular Visitor

Percentage of filtered data category of total in data category

please can someone help me solve this seemingly easy problem.

White , Open

White, Closed

Red, Closed
Blue, Open

Green, Closed

Green, Open

White, Closed

White, Closed

Red, Closed

White, Open

Green, Open

Green, Open

Black, Closed

Blue, Closed

Blue, Open

Red, Open

White, Closed

White, Closed

White, Open

White, Open

 

Of this data set. 9 are white. If I than filter on closed 5 are white. Hence 5/9 55.5% are White closed.
I want this to show in a report table.

 

Column headers:

Colour, Filtered Colour Count, Unfiltered Colour Count, Filtered as % of Unfiltered Colour Count.

1 ACCEPTED SOLUTION

Thanks Smoupre. That helped me figure it out. 

Solution:

MyMeasure= COUNTA(Data[Colour[) / CALCULATE( COUNTA(Data[Colour]) , ALL(Data[Open/ Closed]))

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

You would probably be better off with a measure instead of custom columns, something like:

 

MyMeasure = COUNTA([Colour])/CALCULATE(COUNTA([Colour]),ALL(Table))

Then, as you filter in your report by color or status or if you put this in a matrix, the measure will calculate out correctly.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thanks Smoupre. That helped me figure it out. 

Solution:

MyMeasure= COUNTA(Data[Colour[) / CALCULATE( COUNTA(Data[Colour]) , ALL(Data[Open/ Closed]))

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.