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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.