How to Do Countifs/Sumifs in PowerQuery M.Language Formulas?

Behnam2016 picture Behnam2016 · Feb 11, 2016 · Viewed 31.3k times · Source

Is it possible to Do Excel's Countifs/Sumifs formulas in powerquery Formulas? Let's Say I have [Column1] as "Criteria range" and [Column2] as "Criteria" (Example criteria [Column2] text contains "Product") and I want Count/Sum [Column1] Cells in the new custom column ([Column3])

Answer

ImkeF picture ImkeF · Feb 12, 2016

You might want to try this formula:

List.Count(List.FindText(Source[Column1], [Column2]))

it's not as flexible as SUMIFs but counts the number of records in Column1 that contain the word that stands in the current row of Column2