Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Mic1979
Post Partisan
Post Partisan

Count Occurence and Divide

Dear all,

 

I have the table in the following link:

https://docs.google.com/file/d/1x0EfK8yFfP3AKcuFiGLOV7SzbV-yz2Cn/edit?usp=docslist_api&filetype=msex...

 

What I need to do is:

  1. Count the number of occurence for column "merged" (how many time each of the vlues is repeated)
  2. Divide the values in the column "Volumes" for the corresponding value found in the point 1.

Could you help me?

 

Thanks.

1 ACCEPTED SOLUTION
Vijay_A_Verma
Super User
Super User

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"

View solution in original post

2 REPLIES 2
Vijay_A_Verma
Super User
Super User

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"

Wow many thanks for your help.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.