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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register 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.

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.