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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
MYDATASTORY
Resolver I
Resolver I

How to calculate Current SUM of value for current week in DAX

Hi Friends,

Please help with advice on how to calculate current week sales in DAX.

The current week will be  the weeknum  of today from the calendar which I have created

 

Please see below link with pbix file  with dummy data 

Below is my formulae

Also I would like to count  and display (week 33 (show the current week and month))Number of sales per country for

Week to Date

Month to Date

and YTD

 
Sales WTD = 
    calculate(sum(CountrySales[Sale ]),
                    filter(all('Date'), 'Date'[Date] <= max('Date'[Date]) 
                                     && 'Date'[WeekNum] = max('Date'[WeekNum])))
 

https://app.box.com/s/6ctcewpl99axquosbsjwcct5ikdgvuer

 

Thanks so much.

5 REPLIES 5
v-xicai
Community Support
Community Support

Hi  @MYDATASTORY ,

 

Does that make sense? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.

 

Best regards

Amy

v-xicai
Community Support
Community Support

Hi @MYDATASTORY ,

 

You may create measure like DAX below.

 

Total sale per Week= CALCULATE(SUM(CountrySales[sale]),FILTER(ALLSELECTED(CountrySales),CountrySales[Country] =MAX(CountrySales[Country])&&WEEKNUM(CountrySales[Date]) =WEEKNUM(MAX(CountrySales[Date]))))

Best Regards,

Amy

 

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

GilbertQ
Super User
Super User

Hi there

Could you give an example of the DAX measure you have tried so far?




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

I have updated the link with formulae 

and I would like to Sum Total sales and diplay Current week sales (WTD week to date),Month to date, and Year to date

Hi @MYDATASTORY 

 

Have a look at my blog post on how to easily achieve this, which will allow for the measures you are looking for

 

https://www.fourmoo.com/2016/09/07/create-dynamic-periods-for-fiscal-or-calendar-dates-in-power-bi/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.