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
gk124
Frequent Visitor

Percentage calculation of row total in Power Bi

I have this data table & I want to create a matrix in Power Bi 

gk124_0-1661927238429.png

which calculates grade count & grade count % as shown below

gk124_1-1661927561649.png

What DAX measure will be used to do the above calculation.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @gk124 ,

 

You could create the following measure.

Count% = DIVIDE(COUNT('Table'[Result]),CALCULATE(COUNT('Table'[Result]),FILTER(ALLSELECTED('Table'),[Month]=MAX('Table'[Month]))))

vstephenmsft_0-1662457482488.png

 

 

Best Regards,

Stephen Tao

 

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

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @gk124 ,

 

You could create the following measure.

Count% = DIVIDE(COUNT('Table'[Result]),CALCULATE(COUNT('Table'[Result]),FILTER(ALLSELECTED('Table'),[Month]=MAX('Table'[Month]))))

vstephenmsft_0-1662457482488.png

 

 

Best Regards,

Stephen Tao

 

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

Waaoo..
This is super cool. Thanks a ton!!

gk124
Frequent Visitor

Expecting result should be-

gk124_0-1662370405217.png

Please help !!

amitchandak
Super User
Super User

@gk124 , Usually % of grand total should

 

divide(countrows(Table) , calculate(countrows(Table), allselected()) )

 

or

 

divide(countrows(Table) , calculate(countrows(Table), all()) )

 

 

and subtotal is

 

divide(countrows(Table) , calculate(countrows(Table), removefilters(Table[Name])) )

 

or

 

divide(countrows(Table) , calculate(countrows(Table), allexcept(Table, Table[Month])) )

 

Percent of Total and Percent of SubTotal

https://www.youtube.com/watch?v=6jTildcV2ho

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

Hi Amit,
Thanks for reply but both the measures are returning 0 as a value. Can you please use the data in power bi and then share the measure.

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