Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
WBADAM03
Frequent Visitor

Percentage of Non-Null values in a single column

Hi all,

I'm still bad at DAX and this problem seems simple but I've tried a few approachs and can't get it working.

I have a table, let's say Table1 and I have a column, let's say Score.

I need to find a way to show a percantage in a matrix visual on a dashboard of table1 of all nun-null values.

I got a dax expression to work with blank functions, but I had to convert every null value to a blank value to do this, and I have to make this measure 4 times over.

I got something to technically work, but it gives me values like 103% if I try to show the percantage as % of grand total.

PercentReporting = DIVIDE(COUNTROWS(FILTER('Table1','Table1'[Score] = "null")),COUNTROWS('Score')).

Is there any easier way to do this that won't return weird values like 103% ?
1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @WBADAM03 

 

You can try:

NonBlankPercentage =
DIVIDE (
    COUNTROWS ( FILTER ( 'Table1', NOT ( ISBLANK ( 'Table1'[Score] ) ) ) ),
    COUNTROWS ( 'Table1' )
)

Or:

NonBlankPercentage = DIVIDE( DISTINCTCOUNTNOBLANK(Table1[Score]), COUNTROWS('Table1'))

Does this solve your problem? If not, please provide example data.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
WBADAM03
Frequent Visitor

Hey there, that's prettty similiar to what I used.

It didn't intentionally work because the way SQL returned my data was "null" and not blank. So the notblank function didn't work.

I ended up changing this to output blank values instead of a null text string, that allowed the nonblank function to work.

I'm going to mark your answer as the solution because it's what I ended up using.

Thanks

v-zhangti
Community Support
Community Support

Hi, @WBADAM03 

 

You can try:

NonBlankPercentage =
DIVIDE (
    COUNTROWS ( FILTER ( 'Table1', NOT ( ISBLANK ( 'Table1'[Score] ) ) ) ),
    COUNTROWS ( 'Table1' )
)

Or:

NonBlankPercentage = DIVIDE( DISTINCTCOUNTNOBLANK(Table1[Score]), COUNTROWS('Table1'))

Does this solve your problem? If not, please provide example data.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.