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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
SanketBhagwat
Solution Sage
Solution Sage

Implement Week to Date running total

Hello peers.

I have been giving this task to implement Week to Date running Total in Power BI Desktop. I have been scratching my head over this.

I haven't found anything on Google Related to this.

What I did found out was to calculate Week to Date and Running Total measure.

Will request you people to kindly help.Screenshot (11).png

 

I have calculated Week to Date as below;

WTD =
var CurrentDate=LASTDATE('Base Data'[InvoiceDate])
var DayNumberOfWeek=WEEKDAY(LASTDATE('Base Data'[InvoiceDate]),3)
return
CALCULATE(
SUM('Base Data'[Net Price]),
DATESBETWEEN(
'Base Data'[InvoiceDate],
DATEADD(
CurrentDate,
-1*DayNumberOfWeek,
DAY),
CurrentDate))
 
 

Regards,

Sanket Bhagwat

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, @SanketBhagwat 

In my opinion, it is better to have the WeekOfYear-number column in the dim-date-table and write the below measure.

Please check the link down below, that is the sample pbix file.

 

Picture9.png

 

WTD =
CALCULATE (
Sales[Sales Total],
FILTER ( ALLSELECTED ( Dates[Date] ), Dates[Date] <= MAX ( Dates[Date] ) ),
VALUES ( Dates[Week of Year] )
)

 

 

https://www.dropbox.com/s/ehrgi2f3z71gqyj/sanket7030.pbix?dl=0 

 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi, @SanketBhagwat 

In my opinion, it is better to have the WeekOfYear-number column in the dim-date-table and write the below measure.

Please check the link down below, that is the sample pbix file.

 

Picture9.png

 

WTD =
CALCULATE (
Sales[Sales Total],
FILTER ( ALLSELECTED ( Dates[Date] ), Dates[Date] <= MAX ( Dates[Date] ) ),
VALUES ( Dates[Week of Year] )
)

 

 

https://www.dropbox.com/s/ehrgi2f3z71gqyj/sanket7030.pbix?dl=0 

 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Thank you @Jihwan_Kim .Will check with my team whether the answer is right or not.

Appreciate your help.

 

Regards,

Sanket Bhagwat

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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