This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
I need to get a table that looks like this:
| Employee | Deadline 1 | Deadline 2 | Deadline 3 |
| Person 1 | Yes | Yes | Yes |
| Person 2 | Yes | No | No |
| Person 1 | Yes | No | No |
| Person 3 | Yes | Yes | Yes |
| Person 3 | Yes | No | Yes |
To look like this (calculating the percentage of the time that each employee meets a given deadline):
| Employee | Deadline 1 | Deadline 2 | Deadline 3 |
| Person 1 | 100% | 50% | 50% |
| Person 2 | 100% | 0% | 0% |
| Person 3 | 100% | 50% | 100% |
Solved! Go to Solution.
Just wrap the denominator in a FILTER to exclude blank rows:
Deadline 1 % =
DIVIDE (
COUNTROWS ( FILTER ( KEEPFILTERS ( Table1 ), Table1[Deadline 1] = "Yes" ) ),
COUNTROWS ( FILTER ( KEEPFILTERS ( Table1 ), NOT ISBLANK ( Table1[Deadline 1] ) ) )
)
Please try the measures below:
Deadline 1 % =
DIVIDE (
COUNTROWS ( FILTER ( KEEPFILTERS ( Table1 ), Table1[Deadline 1] = "Yes" ) ),
COUNTROWS ( Table1 )
)
Deadline 2 % =
DIVIDE (
COUNTROWS ( FILTER ( KEEPFILTERS ( Table1 ), Table1[Deadline 2] = "Yes" ) ),
COUNTROWS ( Table1 )
)
Deadline 3 % =
DIVIDE (
COUNTROWS ( FILTER ( KEEPFILTERS ( Table1 ), Table1[Deadline 3] = "Yes" ) ),
COUNTROWS ( Table1 )
)
Place Employee in the Rows field of a Matrix visual and add all three measures as Values. Format each measure as percentage via Format visual → Values → display units.
That worked like a charm. Unfortunately I forgot one factor. Sometimes the employee hasn't submitted a file yet, so the deadline met column is blank. Following your code, that blank row is included. I know it needs a filter, but I can't quite figure out how (I work way more with Power Query than DAX). Thank you!
Just wrap the denominator in a FILTER to exclude blank rows:
Deadline 1 % =
DIVIDE (
COUNTROWS ( FILTER ( KEEPFILTERS ( Table1 ), Table1[Deadline 1] = "Yes" ) ),
COUNTROWS ( FILTER ( KEEPFILTERS ( Table1 ), NOT ISBLANK ( Table1[Deadline 1] ) ) )
)
Hi @music583
Deadline 1% =
DIVIDE(CALCULATE(COUNTROWS('Table'),'Table'[Deadline 1] = "Yes"),COUNTROWS('Table'))
Change it to Percentage by selecting the measure from formatting option.
Similarly you can write measures for Deadline 2% and Deadline 3%
Something like below, with a measure per deadline field. For a clean model and more generalized solution you might be better off depivoting the data first, so that you have 3 columns: employee, deadline index, value
Deadline1_perc=
Var total = countrows( tbl )
Var metDeadline =
Calculate(
Countries( tbl ),
Tbl[deadline 1] = "Yes"
)
Return
metDeadline/total
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 31 | |
| 25 | |
| 21 | |
| 18 | |
| 17 |
| User | Count |
|---|---|
| 62 | |
| 34 | |
| 33 | |
| 25 | |
| 24 |