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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
MrGreg
New Member

Help with summing within a time period

Hi all.  

Seeking help with the following.

My data is a list of projects with a Start Date, End Date and Total Minutes.

 

My Matrix is a table with Week Commencing columns and rows as Impacted Teams.  

 

Where an initiative spans multiple weeks, the matrix needs to allocate the average of Total Minutes across the weeks.  For example, Initiative A, starting 08/07 and concluding 18/07 with a total of 180 minutes, should have 90 minutes each in Week Commencing 08/07 and 15/07. 

 

What is happening is just 90 minutes is being allocated to Week 15/07 (refer screenshot).

Any thoughts on why this is not working?

 

I am using the following Measure:

 

Distributed Minutes =

VAR CurrentWeek = SELECTEDVALUE('Date'[Start of Week (DD-MMM)])

VAR InitiativeStart = MIN(Query[Start Date])

VAR InitiativeEnd = MAX(Query[End Date])

VAR WeeksSpan = DATEDIFF(InitiativeStart, InitiativeEnd, WEEK)+1

VAR ProportionalMinutes = [Sum of Impact Size (Mins)] * DIVIDE(1, WeeksSpan, 0)

RETURN

    IF(CurrentWeek >= InitiativeStart && CurrentWeek <= InitiativeEnd, ProportionalMinutes, 0)

 

 

 

MrGreg_0-1719402270634.png

 

1 REPLY 1
Anonymous
Not applicable

Hi @MrGreg ,

Can you provide some sample data? We can better understand the problem and help you.

How to provide sample data in the Power BI Forum - Microsoft Fabric Community

Or show it as a screenshot or pbix. Please remove any sensitive data in advance. If uploading pbix files please do not log into your account.

Best regards,
Albert He

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.