Forum Discussion
awais692
Jul 26, 2021Copper Contributor
Count if formula for multiple columns in power query
How to write a formula =countif(A2:M2,"<=15") in power query?
SergeiBaklan
Oct 24, 2021Diamond Contributor
You may modify it as
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
countif = Table.AddColumn(
Source, "count",
each List.Count( List.Select(
{ [H4], [H5], [H6], [H7], [H8] } /*Record.FieldValues(_)*/,
each _ <=15 ) ) )
in
countif
defining fields directly.
RayVega
Oct 26, 2021Copper Contributor
Your answer is that I was looking for. Thanks!
- SergeiBaklanOct 26, 2021Diamond Contributor
RayVega , you are welcome