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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi everyone,
Iam calculating the total number of previous week to have change week over week with code below, but in the result it shows same number for every weeks.
I have table calendar here, I still can calculate change in Weeknumber with code above (i guess because it is number), but i wanna display in Weekdisplay (text), so if i apply for Weekdisplay with same code, just change weeknumber = weekdisplay it did not work.
Please help, thank you guys.
week numbers won't work reliably across year boundaries. Safest approach is to subtract 7 days or to divide the day number by 7.
you need to add the following column to the calendar table and then create this measure
numweek = DATEDIFF(min('Calendar'[Date]),'Calendar'[Date],WEEK)
PreviousWeekCount =
VAR PreviosWeekOffset = MAX('CALENDAR'[numweek]) -1
RETURN
CALCULATE(
COUNT('E'[Order Number]),
FILTER(
ALL('Calendar'),
'CALENDAR'[numweek] = Previos
)
)
What is your definition of week? How is this supposed to work across years?
Safest approach is to subtract 7 days.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 16 | |
| 12 | |
| 10 | |
| 7 | |
| 6 |