Count non-empty cells across several columns in Power Query in MS Excel

Copper Contributor

I wish to count non-empty cells across several columns in Power Query.

In MS Excel, I use COUNTNA(A2:J2) but what is the equivalent syntax in PowerQuery?

5 Replies
I tried but due to my lack of knowledge of the DAX language. I am struggling.



@te7037 This is not DAX. I must admit that MS site included in the link I included is not always very useful. Perhaps this one gives more relevant examples.

https://bioffthegrid.com/list-nonnullcount 

Solved the issue! Here is the syntax:

Count_merged_app
=List.NonNullCount({[DCode.1.1.1],[DCode.1.1.2]
,[DCode.1.2],[DCode.1.3],[DCode.2],[DCode.3],[DCode.4],[DCode.5],[DCode.6]})

where [DCode.n.n.n] is a column

Thank you so much for your help.