Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I am working on a dataset that has entries as below.
My objective is to calcluate the % of successful entries / total number of entries.
Any entry is considered successful only if all rows corresponding to the Entry number show "Y". Even 1 "N" against an entry number makes it a failure. Please assist with a DAX measure to calculate the percentage.
For below example AA2, AA3 & AA5 are considered successful based on above logic and hence the result should be 3/5 - 60%
Entry Number | Success / Failure |
AA1 | Y |
AA1 | N |
AA2 | Y |
AA3 | Y |
AA3 | Y |
AA4 | N |
AA4 | Y |
AA5 | Y |
AA5 | Y |
Thanks for the help!
Hi @murali5431 ,
You can try this as a measure.
Results =
VAR failuretable =
SUMMARIZE (
'Table',
'Table'[Entry Number],
"Failure", CALCULATE (
MAX ( 'Table'[Success / Failure] ),
'Table'[Success / Failure] = "N"
)
)
VAR finaltable =
COUNTROWS (
EXCEPT (
failuretable,
'Table'
)
)
VAR distinctrowsinmaintable =
DISTINCTCOUNT ( 'Table'[Entry Number] )
RETURN
DIVIDE (
finaltable,
distinctrowsinmaintable
)
Pull the measure onto a card for your visualization.
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Hi @harshnathani ,
Thanks for the response!
My table actually has around 25 columns of data. I had shared two columns as these are the only two that matter for the calclualton. This is probably causing an error "Each table argument of 'EXCEPT' must have the same number of columns.".
Could you advise a workaround for this?
Thanks,
Murali
Hi @murali5431 ,
Try this
Results =
VAR failuretable =
SUMMARIZE (
'Table4',
Table4[Entry Number],
"Failure", CALCULATE (
MAX ( Table4[Success / Failure] ),
'Table4'[Success / Failure] = "N"
)
)
VAR fin =
SUMMARIZE (
Table4,
Table4[Entry Number],
Table4[Success / Failure]
)
VAR finaltable =
COUNTROWS (
EXCEPT (
failuretable,
fin
)
)
VAR distinctrowsinmaintable =
DISTINCTCOUNT ( 'Table4'[Entry Number] )
RETURN
DIVIDE (
finaltable,
distinctrowsinmaintable
)
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Hi @murali5431 ,
Did the previous solution solve your issue.
If yes, please mark it as Solution for other users to benefit.
Regards,
HN
Please try this expression that returns 60% for your example data.
Pct Successful =
VAR __summarytable =
ADDCOLUMNS (
VALUES ( Entry[Entry Number] ),
"@N Count", CALCULATE ( COUNTROWS ( Entry ), Entry[Success / Failure] = "N" ) + 0
)
RETURN
DIVIDE (
COUNTROWS ( FILTER ( __summarytable, [@N Count] = 0 ) ),
COUNTROWS ( __summarytable )
)
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Divide the distinct count of all entries that have a No by the distinct count of all entries. Then subtract that from 1.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
20 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |