Forum Discussion
KelvinMorel
1 year agoHelper II
Count occurrences from grouped Table column
Hi all, I have a large table of all customer's invoices, in "AANTAL DAGEN" column I count how many days are between invoice's expire date and invoice's paid date, from there I would like to extract ...
- 1 year ago
Something like the following might work for you...
let Source = Excel.CurrentWorkbook(){[Name="Table3"]}[Content], #"Removed Columns" = Table.RemoveColumns(Source,{"VERVALDATUM"}), #"Grouped Rows" = Table.Group(#"Removed Columns", {"KLANT", "NAAM", "CONTRACT"}, {{"Count", each Table.RowCount(_), Int64.Type}, {"All", each _, type table [BU=number, KLANT=text, NAAM=text, CONTRACT=text, FACTUUR=text, MONTH=text, AANTAL DAGEN=number]}}), #"Added Column" = Table.AddColumn(#"Grouped Rows", "Zeros Row Count", each Table.RowCount(Table.SelectRows([All], each [AANTAL DAGEN] = 0))) in #"Added Column"
KelvinMorel
1 year agoHelper II
Great,
precisely what I was looking for, thank you very much.