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
Hi,
I am struggling with being able to add a % for PASS and % for FAIL
I need to use the pass/fail and the count of ticket number to do this, I've tried various different ways however can't seem to get this right.
Thanks
Liz
Solved! Go to Solution.
Hi @erg24 ,
Please try:
Measure =
var _count=COUNTROWS('Table')
var _fail=CALCULATE(COUNTROWS('Table'),FILTER('Table',[Pass/Fail]="Fail"))
var _pass=CALCULATE(COUNTROWS('Table'),FILTER('Table',[Pass/Fail]="Pass"))
return IF(ISINSCOPE('Table'[Pass/Fail]),_count, DIVIDE(_fail,_pass))
If you want to set different format, please try:
format =
var _count=COUNTROWS('Table')
var _fail=CALCULATE(COUNTROWS('Table'),FILTER('Table',[Pass/Fail]="Fail"))
var _pass=CALCULATE(COUNTROWS('Table'),FILTER('Table',[Pass/Fail]="Pass"))
return IF(ISINSCOPE('Table'[Pass/Fail]), FORMAT(_count,"##"), FORMAT(DIVIDE(_fail,_pass) ,"#.0%"))
But it returns Text type not Number type:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @erg24 ,
Please try:
Measure =
var _count=COUNTROWS('Table')
var _fail=CALCULATE(COUNTROWS('Table'),FILTER('Table',[Pass/Fail]="Fail"))
var _pass=CALCULATE(COUNTROWS('Table'),FILTER('Table',[Pass/Fail]="Pass"))
return IF(ISINSCOPE('Table'[Pass/Fail]),_count, DIVIDE(_fail,_pass))
If you want to set different format, please try:
format =
var _count=COUNTROWS('Table')
var _fail=CALCULATE(COUNTROWS('Table'),FILTER('Table',[Pass/Fail]="Fail"))
var _pass=CALCULATE(COUNTROWS('Table'),FILTER('Table',[Pass/Fail]="Pass"))
return IF(ISINSCOPE('Table'[Pass/Fail]), FORMAT(_count,"##"), FORMAT(DIVIDE(_fail,_pass) ,"#.0%"))
But it returns Text type not Number type:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Here is a post that will likely help you. If it does not, please provide more details showing the structure of your dataset, measures and provide an example.
https://community.powerbi.com/t5/Desktop/Percent-of-Total-Within-Hierarchy-Drilldown/m-p/777948
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 |
|---|---|
| 8 | |
| 7 | |
| 5 | |
| 4 | |
| 3 |