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

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

Reply
PompeuPD
Frequent Visitor

Average difference between multiple dates in column

Hi,

 

In this query I have two separate tables. One with baby cows that have been born, and the second with the mothers.

 

In the first one I have the following columns

Baby cow ID

Mothers ID code 

Date of birth

 

In the second I have the following column

Mothers ID code

 

The problem is that the same mother can give birth multiple times. So in the first table I sometimes have the same Mothers ID code with different birth dates

 

I want to be able to calculate the average time difference, that a given cow gives birth so that i end up with a table with these columns:

Mothers ID code

Month Average between Births (For example: 12.3 months)

 

I merged the two tables but i ended up with duplicates Mothers ID code (as expected), and i dont know where to go from there.

Table after merge:

Mothers ID code         Date of birth

1001                            10/2/2015

1001                            11/2/2016

1001                              7/3/2017

1002                            10/4/2017

1003                            7/10/2016

1003                              8/9/2017

...

 

The result I want:

Mothers ID code      Month Average between births

 

 

Hope that someone can help me 

 

 

0 REPLIES 0

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.