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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Count blank cells across a range of column..

Hi There,

 

I am new to Power Query and stuck up with below, Below formula from excel counts number of blank cells from a cell range.

 

I am trying to replicate the same in power bi query editor. My plans are to create calculated fields and use the logic to get the number of blank cells present.

 

=COUNTIF(Y2:AE2,"")

 

Thanks in Advance 🙂

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please transpose the table in power query like that.

Capture.PNG

 

Close and apply and create a measure as below.

Measure = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[Column1] = BLANK()))

2.PNG

 

Pbix as attached.

 

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

5 REPLIES 5
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please transpose the table in power query like that.

Capture.PNG

 

Close and apply and create a measure as below.

Measure = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[Column1] = BLANK()))

2.PNG

 

Pbix as attached.

 

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
artemus
Microsoft Employee
Microsoft Employee

You can add a new column with a formula like:

 

List.Count(List.Select(Record.FieldValues([[Y], [Z], [AA], {AB], [AC], [AD], [AE]]), each _ = "" or _ = null))

 

 

Anonymous
Not applicable

@artemus Thanks a lot for your response...

 

Below is the further scenarion post using the formula.

 

The syntax for 'COUNT' IS INCORRECT.
(DAX(LIST.COUNT(List.Select(record.Fieldvalues(column1,col2.....,or _ = " ")

Further to this it says "List.Count/List.Select/Record.fieldvalues is not a function".

 

Kindly Advise!!

 

Regards..

Anonymous
Not applicable

@amitchandak any advise on this?

@Anonymous , the options that I can quickly think off.

Measure =
calculate(count(table[Column1]), isblank(table[Column1]))
+calculate(count(table[Column2]), isblank(table[Column2]))
+calculate(count(table[Column3]), isblank(table[Column3]))

OR
Measure =
var _1, union(all(table[Column1]),all(table[Column2]),all(table[Column3]))
return
countx(_1,[Column1])

s

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.