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! Request now

Reply
chrismpbi
Frequent Visitor

Split average of sum between start and end date

Hi,

 

I would like to calculate the average of a sum and split it between the start and end date.

Hope somebody can help me with this. Chris

 

 

Unbenannt.jpg

4 REPLIES 4
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @chrismpbi,

 

Suppose the dataset is look like below. If there isn't a [No] column to identify each row uniquely, you should add an index column in Query Editor mode first.

1.PNG

 

Create a calendar table.

Dim Date =
FILTER (
    ADDCOLUMNS (
        CALENDAR ( MIN ( 'Test Data1'[Start Date] ), MAX ( 'Test Data1'[End Date] ) ),
        "Month", FORMAT ( [Date], "MMM" )
    ),
    DAY ( [Date] ) = 1
)

2.PNG

 

New a calculated table to CrossJoin above two tables. And add a calculated column [Average Per month]

CrossJoin =
FILTER (
    CROSSJOIN ( 'Test Data1', 'Dim Date' ),
    'Dim Date'[Date] >= 'Test Data1'[Start Date]
        && 'Dim Date'[Date] <= 'Test Data1'[End Date]
)

Average per month =
'CrossJoin'[Amount]
    / CALCULATE (
        COUNT ( 'CrossJoin'[Month] ),
        ALLEXCEPT ( 'CrossJoin', 'CrossJoin'[No] )
    )

3.PNG

 

Use a Matrix to analyse data.

4.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Yuliana,

 

thanks for your response! It seems to work but the month by which the amount is divided should be independent from the date filters. in the screenshot below the amount is just divided through the month that are in the selected year.

 

Screen Shot 07-25-18 at 10.50 AM.jpg

 

 

jthomson
Solution Sage
Solution Sage

There's a few posts on how to do this, but a bit more info would be useful - are you just splitting it by months? Does it matter how much of a month a project is running for? What were you doing in May?

Hi Jthomson,

 

This is just an example dataset. I have a few thousand lines with project costs. I would like to split those costs over the project duration. It would be good if I could also split it per day but its not necessary.

 

Christoph

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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!

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.

Top Solution Authors