Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have this data table & I want to create a matrix in Power Bi
which calculates grade count & grade count % as shown below
What DAX measure will be used to do the above calculation.
Solved! Go to Solution.
Hi @gk124 ,
You could create the following measure.
Count% = DIVIDE(COUNT('Table'[Result]),CALCULATE(COUNT('Table'[Result]),FILTER(ALLSELECTED('Table'),[Month]=MAX('Table'[Month]))))
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.
Hi @gk124 ,
You could create the following measure.
Count% = DIVIDE(COUNT('Table'[Result]),CALCULATE(COUNT('Table'[Result]),FILTER(ALLSELECTED('Table'),[Month]=MAX('Table'[Month]))))
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!!
Expecting result should be-
Please help !!
@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
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.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 97 | |
| 74 | |
| 50 | |
| 47 | |
| 44 |