Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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.
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
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.
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/
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
28 | |
26 | |
22 | |
22 | |
18 |
User | Count |
---|---|
51 | |
34 | |
28 | |
24 | |
21 |