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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply

Rolling Age based on Datediff - Need a Solution

Hi All, I just can't figure this out... working on this problem for days and I have no solution.  Looking to the pros...

 

I have 148,876 shipment dates

I have a simple date table starting 01/01/2018 to present day.

 

I need a few things:

1.  On any given date (from the date table), how many of the 148K shipment dates were 0-6 months old, 6-12, 12-18, and 18-24.

2.  On any given date (from the date table), what was the average age of the 148K shipments?

3.  Now I need the same as 1 & 2, but it needs to be aggregated into weeks, not days.  For example, 01/01/2018 is a Monday, 01/08/2018 is a Sunday.  For this week specifically (and every week thereafter):

  - how many of the 148K shipment dates were 0-6 months old, 6-12, 12-18, and 18-24.

  - what was the average age of the 148K shipments?

 

Ideas?  My brain melted a few days ago, I'm in need of assistance.

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!

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.