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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
nbrandborg
Helper II
Helper II

Count number of cells with non-numeric data per row

Hi all,

I'm struggeling to do something which I thought would be fairly easy to do (at least it is in Excel), but I cannot find my way around it in PowerBI.
I need two additional columns in my dataset (marked with bold) based on the imported data. I need one column to count the number of blank cells and one with filled cells per row. The first column (in italic) should not be counted. The data is all formated as text.

How is this possible?

My dataset looks similar to this:

MaterialColumn AColumn BColumn CColumn DColumn EFilledBlank
1231XX XX41
1242X XX 32
1255XXXXX50
1266 X   14
1 ACCEPTED SOLUTION

@nbrandborg 

 

I cannot thing of any other way using DAX.

 

If you want to do it directly on Power Query you can check the following thread:

https://community.powerbi.com/t5/Desktop/Count-non-blank-cells-across-a-range-of-columns/m-p/494271

 

View solution in original post

5 REPLIES 5
themistoklis
Community Champion
Community Champion

@nbrandborg 

 

Try something like this:

Blank= INT(Table[Column A]= BLANK()) + INT(Table[Column B]= BLANK()) + INT(Table[Column C]= BLANK()) ...
 
Non Blank = INT(Table[Column A]<> BLANK()) + INT(Table[Column B]<> BLANK()) + INT(Table[Column C]<> BLANK()) ...

@themistoklis 

 

Thanks for your suggestion! Do you know if it can be done on a range like 'ColumnA: ColumnE'? Some of the datasets has more than 50 columns? 

@nbrandborg 

 

I cannot thing of any other way using DAX.

 

If you want to do it directly on Power Query you can check the following thread:

https://community.powerbi.com/t5/Desktop/Count-non-blank-cells-across-a-range-of-columns/m-p/494271

 

@themistoklis Solving it via the Power Query was a great idea. I managed to get the additional count columns needed by this.
Thanks for your support!

Also you can try something like this:

Blanks =
VAR ColumnA = INT(Table[Column A]= BLANK()) -- OR IF (ISBLANK(Table[Column A]), 1, 0)
VAR ColumnB = INT(Table[Column B]= BLANK())
VAR ColumnC = INT(Table[Column C]= BLANK())
RETURN ColumnA + ColumnB + ColumnC

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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