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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.