Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Greetings everyone,
I require some help with DAX. I am currently displaying the Year, Week, and Date in a Matrix Table, allowing for drill-down functionality. I am in need of writing a calculation for a Measure that accumulates values and resets every week. It's important to note that my week starts on Monday. Below is the measure I have written for the current year. In the second column, I need a calculation that represents the same value for the prior year. I would greatly appreciate any assistance or guidance provided. Thank you in advance.
Thank you guys, much appreciated.
The meaning of wtd is roughly as follows, please refer to it.
```
VAR DATE_END_AC =
LASTDATE ( '01_Calendar'[dates] )
VAR N_W =
WEEKDAY ( DATE_END_AC, 3 ) // Monday:0,Sunday:6
VAR DATE_START_AC =
DATEADD ( DATE_END_AC, - N_W, DAY )
VAR DATE_TABLE_AC =
DATESBETWEEN ( '01_Calendar'[dates], DATE_START_AC, DATE_END_AC )
VAR WTD0 =
CALCULATE ( SELECTEDMEASURE (), DATE_TABLE_AC )
```
There are more time dimensions, see the picture below.
https://jiaopengzi.com/2653.html
Is there an English version of this?
@batman , have column year, week, and weekday. try like
WTD LY = CALCULATE(sum(Tab1[Dollars]), FILTER(ALL('Calendar'),'Calendar'[Year]=max('Calendar'[Year]) -1 && 'Calendar'[Week]=max('Calendar'[Week]) && 'Calendar'[Weekday] <=max('Calendar'[Weekday])))
@amitchandak - Thank you for providing feedback, I was able to make it work with a similar formula
However once I roll it up to yearly level it just take the last number of the last week. Have you ran into this challange before?
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
8 | |
7 | |
4 | |
3 |
User | Count |
---|---|
15 | |
14 | |
12 | |
10 | |
9 |