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
Hello,
I'm inexperienced with PBI and I'm trying to create a percentage value in a matrix visual.
The DB data is something like this:
| ID | details | sla met |
| 1 | problem1 | 0 |
| 2 | problem2 | 1 |
| 3 | problem2 | 1 |
| 4 | problem1 | 1 |
| 5 | problem3 | 0 |
| 6 | problem3 | 0 |
The matrix I'm using has the 'details' as rows, the 'sla met' as columns and the count of 'sla met' as values, showing something like:
| details | 0 | 1 | total |
| problem1 | 1 | 1 | 2 |
| problem2 | 2 | 2 | |
| problem3 | 2 | 2 |
What I need to have is a measure that divides value in the '1' column by the total, so i can have a percentage of '1' column vs. total.
Is there a way of doing this? I'm using PBI service included in Microsoft Fabric.
Thanks in advance.
Solved! Go to Solution.
Hi
The easiest way would be to right-click on the field in the values configuration of the matrix visual and choose display as percentage of row as described here: https://www.popautomation.com/post/power-bi-percentage-of-total#:~:text=identify%20a%20calculation.-...
If you want to write a measure, this would be the code:
Pct. SLA Met =
VAR _SlaCountInContext =
COUNTROWS ( Table )
VAR _SlaCountAll =
CALCULATE (
COUNTROWS ( Table ),
REMOVEFILTERS (Table[sla met] )
)
RETURN
DIVIDE ( _SlaCountInContext, _SlaCountAll )
BR
Martin
Hi
The easiest way would be to right-click on the field in the values configuration of the matrix visual and choose display as percentage of row as described here: https://www.popautomation.com/post/power-bi-percentage-of-total#:~:text=identify%20a%20calculation.-...
If you want to write a measure, this would be the code:
Pct. SLA Met =
VAR _SlaCountInContext =
COUNTROWS ( Table )
VAR _SlaCountAll =
CALCULATE (
COUNTROWS ( Table ),
REMOVEFILTERS (Table[sla met] )
)
RETURN
DIVIDE ( _SlaCountInContext, _SlaCountAll )
BR
Martin
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 49 | |
| 21 | |
| 11 | |
| 11 | |
| 10 |