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
quinncode
Frequent Visitor

count blanks by row

How do I count blank values by row in a custom column with DAX?

1 ACCEPTED SOLUTION

Hi @quinncode !

 

You can use following DAX to create a custom column which will add blank occurences in Dogs & Cats columns.

 

Blank = IF(ISBLANK(Pet[Dogs]) || Pet[Dogs] = "", 1, 0) 
        + IF(ISBLANK(Pet[Cats]) || Pet[Cats] = "", 1, 0)

 

Regards,

Hasham

View solution in original post

4 REPLIES 4
NidhiBhusari
Helper IV
Helper IV

@quinncode use COUNTBLANK() DAX function to get count of blank values(rows) in a column.

DOGSCATSBLANKS
dog 1
 cat1
dogcat0

 

Thanks, however I need a count of blanks at the row level like table above

Hi @quinncode !

 

You can use following DAX to create a custom column which will add blank occurences in Dogs & Cats columns.

 

Blank = IF(ISBLANK(Pet[Dogs]) || Pet[Dogs] = "", 1, 0) 
        + IF(ISBLANK(Pet[Cats]) || Pet[Cats] = "", 1, 0)

 

Regards,

Hasham

Thank you! Perfect answer.

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.