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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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