Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi, I recieve a sheet weekly which has many sales peoples name and their year to date total amongst other data. The sheets have a date stamp that is recognised by powerbi. I would like to have a dax measure which calculates last weeks sales per advisor (and totals) based on these new ytd totals that arrive weekly. Any help with this would be greatly appreciated.
Solved! Go to Solution.
Hi @arc1412 ,
You may create measures like DAX below.
Current Week =
CALCULATE (
Table1[Sales],
FILTER (
Table1,
Table1[advisor] = MAX ( Table1[ advisor] )
&& YEAR ( Table1[Date] ) = YEAR ( MAX ( Table1[Date] ) )
&& WEEKNUM ( Table1[Date] ) = WEEKNUM ( MAX ( Table1[Date] ) )
)
)
Last Week =
CALCULATE (
Table1[Sales],
FILTER (
Table1,
Table1[advisor] = MAX ( Table1[ advisor] )
&& YEAR ( Table1[Date] ) = YEAR ( MAX ( Table1[Date] ) )
&& WEEKNUM ( Table1[Date] )
= WEEKNUM ( MAX ( Table1[Date] ) ) - 1
)
)
Week Change= [Current Week] -[Last Week]
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @arc1412 ,
Do the suggestions from engineers 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 @arc1412 ,
You may create measures like DAX below.
Current Week =
CALCULATE (
Table1[Sales],
FILTER (
Table1,
Table1[advisor] = MAX ( Table1[ advisor] )
&& YEAR ( Table1[Date] ) = YEAR ( MAX ( Table1[Date] ) )
&& WEEKNUM ( Table1[Date] ) = WEEKNUM ( MAX ( Table1[Date] ) )
)
)
Last Week =
CALCULATE (
Table1[Sales],
FILTER (
Table1,
Table1[advisor] = MAX ( Table1[ advisor] )
&& YEAR ( Table1[Date] ) = YEAR ( MAX ( Table1[Date] ) )
&& WEEKNUM ( Table1[Date] )
= WEEKNUM ( MAX ( Table1[Date] ) ) - 1
)
)
Week Change= [Current Week] -[Last Week]
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@arc1412 - I created something for this once - https://community.powerbi.com/t5/Quick-Measures-Gallery/Periodic-Revenue-Reverse-YTD/m-p/373185#M111
But, would need to see example data to adapt it to your situation.
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
Thanks for the reply. I took your advice and have been able to find the formula elsewhere. I also read your posts and it will definitely follow those guidlines next time on my queries. first time user of this forum so I appreciate the guidance.
@arc1412 , Can you share sample data and sample output in table format?
You can refer my blog on the week, you can subtract this week - last week to get week wise data
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 98 | |
| 72 | |
| 50 | |
| 50 | |
| 43 |