Forum Discussion
Mic1979
1 year agoPost Partisan
Count Occurence and Divide
Dear all,
I have the table in the following link:
What I need to do is:
- Count the number of occurence for column "merged" (how many time each of the vlues is repeated)
- Divide the values in the column "Volumes" for the corresponding value found in the point 1.
Could you help me?
Thanks.
You may use below code
let Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content], #"Grouped Rows" = Table.Group(Source, {"Merged"}, {{"Count", each Table.RowCount(_)}, {"Result", each [Volumes]{0} / Table.RowCount(_)}}) in #"Grouped Rows"
2 Replies
- Vijay_A_VermaMost Valuable Professional
You may use below code
let Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content], #"Grouped Rows" = Table.Group(Source, {"Merged"}, {{"Count", each Table.RowCount(_)}, {"Result", each [Volumes]{0} / Table.RowCount(_)}}) in #"Grouped Rows"- Mic1979Post Partisan
Wow many thanks for your help.