Forum Discussion
vacacelaivan
8 years agoFrequent Visitor
Need Help with Custom Week of month number
Hi all, I've been trying to get around this problem with no luck. Trying to create a column for the week number of the month, with the week always starting on Monday and ending on a Sunday. Mon...
- 8 years ago
Hi vacacelaivan,
Based on my test, it is not possible to meet your requirement currently. You can come up a new idea about that and add your comments there to improve Power BI and make this feature coming sooner.
Regards,
Frank
abbasabdulla
8 years agoFrequent Visitor
Hi,
Does changing 21 to 2 in your function solve this? Why you put the 21?
weekinmonth = 1 + WEEKNUM ( Dates[Date],2)-WEEKNUM( STARTOFMONTH (Dates[Date]),2)
vacacelaivan
8 years agoFrequent Visitor
I tried both methods WEEKNUM (Date, 2) and WEEKNUM (DATE, 21), but both don't work in this case.
The parameter 21 is to return weeknumbers according to ISO 8601.http://blog.gbrueckl.at/2012/04/iso-8601-week-in-dax/ and a number of other articles in this forum.
Bump?!?
- abbasabdulla8 years agoFrequent Visitor
Try using this function
= 1 + WEEKNUM ( Dates[Date],2)-WEEKNUM( DATE(YEAR(Dates[Date]),MONTH(Dates[Date]),1),2)