cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Levent
Frequent Visitor

Cumulative by week

Hello,

 

Anybody can resolve my problem ? 

 

I want to get the budget of project by week with DAX.  I have startDate and endDate. But i can't calculate realtive to week.. I tried by month with TOTALMTD but it's not good result.

 

cumul_table.png

Thanks a lot for your responses !

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: Cumulative by week

Hi @Levent ,

 

One sample for your reference, Please check the following steps as below.

 

1. Create a Calendar table and insert a calculated column in it.

 

Calendar = CALENDARAUTO()
Week = "Week" & WEEKNUM('Calendar'[Date])

2. Create a measuare to get the excepted result.

 

Measure = 
CALCULATE(SUM(Porjects[Budget]),FILTER(Porjects, Porjects[DateEnd]>=MIN('Calendar'[Date])))

Capture.PNG

 

Pbix as attached.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

5 REPLIES 5
Gopal30 Helper I
Helper I

Re: Cumulative by week

Try this:

 

Cumu_Total = Calculate(Sum(Table[Budget]), Filter(All("Table[Date]"), Table[Date] <= MAX (Table[Date])))

Levent
Frequent Visitor

Re: Cumulative by week

Thank for your response. 

 

It's not just cumulating in time week by week.

But I need to cumulate only the budgets that have a start and end date in the first day of the week.

Community Support
Community Support

Re: Cumulative by week

Hi @Levent ,

 

One sample for your reference, Please check the following steps as below.

 

1. Create a Calendar table and insert a calculated column in it.

 

Calendar = CALENDARAUTO()
Week = "Week" & WEEKNUM('Calendar'[Date])

2. Create a measuare to get the excepted result.

 

Measure = 
CALCULATE(SUM(Porjects[Budget]),FILTER(Porjects, Porjects[DateEnd]>=MIN('Calendar'[Date])))

Capture.PNG

 

Pbix as attached.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

Super User IV
Super User IV

Re: Cumulative by week

Hi,

Will Week1 always start on the first day of the year?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Levent
Frequent Visitor

Re: Cumulative by week

Thanks a lot, it's clear and perfect !

Helpful resources

Announcements
Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘Better Together’ Integration Forum Launch

‘Better Together’ Integration Forum Launch

We've launched a how-to forum where you can learn about how Power BI integrates with other Power Platform products.

Top Solution Authors
Top Kudoed Authors