This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hello developers,
I would like count the numbers of rows where is not null ?
Do you have an idea ?
Thanks !
| Column 1 | Column 2 | Column 3 | RESULT |
| 2 | null | null | 1 |
| null | 6 | 7 | 2 |
| null | null | null | 0 |
| 4 | 7 | 10 | 3 |
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] )
I misspoke,
I would like create new column 'Result' for have the same output like my exemple in the first topic.
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 1 | Column 2 | Column 3 | RESULT |
| ... | ... | 2 | null | null | 1 |
| ... | ... | null | 6 | 7 | 2 |
| ... | .... | null | null | null | 0 |
| ... | ... | 4 | 7 | 10 | 3 |
Hi,
you can use Remove blank rows
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
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!
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.