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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ajisharavind_99
Advocate I
Advocate I

Month start from Friday and end on last Thursday

Hi, 

I am looking for a solution for my Power BI project to identify the last Friday of the previous month as the start of the month and the last Thursday of the current month as the month's end 🙄. If the month ends on 25, the following month will begin on 26. Please see the screenshot for the expected result.

ajisharavind_99_0-1677219904589.png

 

1 ACCEPTED SOLUTION
CNENFRNL
Community Champion
Community Champion

CNENFRNL_0-1677228781242.png

 

CNENFRNL_3-1677229036483.png

 

 

For fun only, very simple case for the powerful Excel worksheet formula,

CNENFRNL_2-1677228892732.png

 


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

5 REPLIES 5
tamerj1
Super User
Super User

Another solution for reference

1.png

CNENFRNL
Community Champion
Community Champion

CNENFRNL_0-1677228781242.png

 

CNENFRNL_3-1677229036483.png

 

 

For fun only, very simple case for the powerful Excel worksheet formula,

CNENFRNL_2-1677228892732.png

 


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Thank you @CNENFRNL 

FreemanZ
Super User
Super User

hi @ajisharavind_99 

try to add a calculated column like:

MonthColumn =
VAR _month = MONTH(DateTable[Date])
VAR _lastfriday =
MAXX(
   FILTER(
      DateTable,
      WEEKDAY(DateTable[Date], 2)=5
         &&MONTH(DateTable[Date]) = _month
    ),
   DateTable[Date]
)
RETURN
IF(
   [Date] >= _lastfriday,
   FORMAT(EDATE([Date], 1), "mmm-yy"),
   FORMAT([Date], "mmm-yy")
)

Thanks @FreemanZ 
Only in December 2022 was an issue found, which begins on Thursday rather than Friday. 

ajisharavind_99_0-1677230873648.png

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.