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
greggue
New Member

Custom Month to date

Hello all,

Our fiscal months are not based on calendar months but ends on the Saturday of every month.  Therefore the our fiscal month starts on different day every month.
I have the dax formula to calculate the last saturday of the month but I am not sure how to implement it to use in my slicer

 

greggue_0-1678909916087.png

 

Here's the measure that give me the last saturday of the month


customEOM =
VAR dateVal = [Date]
RETURN
    if (
        dateVal > DATE ( '2018, 12, 31'),
        if (
            dateVal
                > if (
                    WEEKDAY ( EOMONTH ( dateVal, 0 ), 1 ) = 7,
                    EOMONTH ( dateVal, 0 ),
                    EOMONTH ( dateVal, 0 ) - WEEKDAY ( EOMONTH ( dateVal, 0 ), 1 )
                ),
            if (
                WEEKDAY ( EOMONTH ( EOMONTH ( dateVal, 0 ), 1 ), 1 ) = 7,
                EOMONTH ( EOMONTH ( dateVal, 0 ), 1 ),
                EOMONTH ( EOMONTH ( dateVal, 0 ), 1 )
                    - WEEKDAY ( EOMONTH ( EOMONTH ( dateVal, 0 ), 1 ), 1 )
            ),
            if (
                WEEKDAY ( EOMONTH ( dateVal, 0 ), 1 ) = 7,
                EOMONTH ( dateVal, 0 ),
                EOMONTH ( dateVal, 0 ) - WEEKDAY ( EOMONTH ( dateVal, 0 ), 1 )
            )
        ),
        EOMONTH ( dateVal, 0 )
    )

 

 

1 REPLY 1
andhiii079845
Solution Sage
Solution Sage

What is if you create a custom table for your date where you can descripe which date is in which fiscal month.

That make it more easier I think.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.