Forum Discussion
Antonioclk
3 years agoNew Member
Count specific occurrences based on another column
Hi i have a table with 3 columns: Owner - name of the system owner (string) System - name of the system (string) Compliant - value of compliancy (boolean) something like this Owner System ...
wdx223_Daniel
3 years agoCommunity Champion
NewStep=let a=Table.Group(PreviousStepName,"Owner",{"n",each {Table.RowCount(_),List.Count(List.Select([Compliant],each _="TRUE"))}}) in #table(Table.ColumnNames(PreviousStepName)&{"SystemCount","CompliantCount"},Table.ToList(PreviousStepName,each _&a{[Owner=_{0}]}[n]))