cancel
Showing results for
Did you mean:
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.

Thanks a lot for your responses !

1 ACCEPTED SOLUTION

Accepted Solutions
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])))```

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.
5 REPLIES 5
Helper I

Re: Cumulative by week

Try this:

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

Frequent Visitor

Re: Cumulative by week

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

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])))```

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.
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
Frequent Visitor

Re: Cumulative by week

Thanks a lot, it's clear and perfect !

Announcements

Announcing the New Spanish Forum

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

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘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