March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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..
@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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
23 | |
16 | |
15 | |
7 | |
6 |
User | Count |
---|---|
33 | |
29 | |
16 | |
13 | |
12 |