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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Mat40220
Regular Visitor

Numbers of rows where is not null

Hello developers,

 

I would like count the numbers of rows where is not null ?

 

Do you have an idea ?

 

Thanks !

 

Column 1Column 2Column 3RESULT
2nullnull1
null672
nullnullnull0
47103
7 REPLIES 7
Anonymous
Not applicable

Hello, you can use this

= Table.AddColumn(Source, "Custom", each List.Count( List.Select( Record.FieldValues(_), each _ <>null ) ) )

Thank Alan,

 

Where I precise my columns names ( [Column1]  and  [Column2] and  [Column2] )

Mat40220
Regular Visitor

I misspoke,

 

I would like create new column 'Result' for have the same output like my exemple in the first topic.

Hi,

in the attached file you can find 2 solutions (i don't really know what you need)

serpiva64_0-1676041879655.png

If this post is useful to help you to solve your issue, consider giving the post a thumbs up and accepting it as a solution!

Thanks a lot serpiva,

 

but in my table i have other columns, i would like function work with precise my columns.

Examples

 

Other column ...Other column ...Column 1Column 2Column 3RESULT
......2nullnull1
......null672
.......nullnullnull0
......47103

 

Hi, you obtain your result by applying the steps of the attached file

serpiva64_0-1676049014238.png

If this post is useful to help you to solve your issue, consider giving the post a thumbs up and accepting it as a solution!

 

serpiva64
Solution Sage
Solution Sage

Hi,

you can use Remove blank rows

serpiva64_0-1676025571055.png

 

then you obtain this formula

= Table.SelectRows(Source, each not List.IsEmpty(List.RemoveMatchingItems(Record.FieldValues(_), {"", null})))

You need to change "" with "null"

= Table.SelectRows(Source, each not List.IsEmpty(List.RemoveMatchingItems(Record.FieldValues(_), {"null", null})))

finally you add an index column from 1

serpiva64_1-1676025712331.png

 

and you obtain your result

If this post is useful to help you to solve your issue, consider giving the post a thumbs up and accepting it as a solution!

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors