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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
lawada
Helper III
Helper III

fiscal week calculations

hello, 

 

i need help in this, 

 

i have a fiscal week calender which starts on wednesday and ends on tuesday so week day =1 on wednesday and weekday= 7 on tuesday. 

 

in my reprot user will select from two slicers :

1- montn (EX. December)

2- Week number (EX. Week2)

 

in this case ,the date will be between (2-12-2020 and 8-12-2020)

 

now the output that i have to calculate is :

 

(total orders for the same selected period LAST MONTH ) which according to the given example output should be within:

 Month :November- Week: Week 2 - date between: (11-11-2020 and 17-11-2020)

 

note that the given dates are just an example to explain how the logic should work so i would like my DAX measure to calulate dynamically the output for any selected Month and week the user will select.

 

 

Appreciate the help..

 

1 REPLY 1
amitchandak
Super User
Super User

@lawada , for Tuesday week, refer

 

.Any Weekday Week - Start From Any day of Week
https://community.powerbi.com/t5/Community-Blog/Any-Weekday-Week-Decoding-Date-and-Calendar-2-5-Powe...

 

for  month week

 

Start Month = STARTOMONTH('Date'[Date])
WeekDay = WEEKDAY([Date],2) //Use the Tuesday week this is Monday
Start of Week = [Date] -[WeekDay]+1 //Use the Tuesday week this is Monday
Month Week = QUOTIENT(DATEDIFF(Minx(FILTER('Date',[Start Month]=EARLIER([Start Month])),'Date'[Start of Week]),[Date],DAY),7)+1

 

now you can compare week this month vs week last month

 

Otherwise week is 28 days behind

last month same week Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-28,DAY )))

 

 

also check

Power BI — Week on Week and WTD
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...
https://www.youtube.com/watch?v=pnAesWxYgJ8

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.