Nov 16 2022 07:29 AM
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?
Nov 16 2022 07:38 AM
@te7037 Look into the M function List.NonNullCount
https://learn.microsoft.com/en-us/powerquery-m/list-nonnullcount
Nov 16 2022 08:07 AM
Nov 16 2022 08:25 AM
@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.
Nov 16 2022 08:39 AM - edited Nov 16 2022 08:41 AM
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.
Nov 16 2022 09:36 PM
@te7037 You're welcome!