Forum Discussion
te7037
Nov 16, 2022Copper Contributor
Count non-empty cells across several columns in Power Query in MS Excel
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?
te7037
Nov 16, 2022Copper Contributor
I tried but due to my lack of knowledge of the DAX language. I am struggling.
Riny_van_Eekelen
Nov 16, 2022Platinum Contributor
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.
- te7037Nov 16, 2022Copper Contributor
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.- Riny_van_EekelenNov 17, 2022Platinum Contributor
te7037 You're welcome!