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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
WhaleWatcher222
Helper II
Helper II

Modify DAX to include current FULL month as opposed to <=Today()

Hi Experts

 

How would you modify the following DAX so the table includes the current month in full...and filters out future months | periods

 

_MonthYearTable = 
    DISTINCT(
        SELECTCOLUMNS(
            FILTER(
                'Financial Datasets',
                'Financial Datasets'[Date] <= TODAY()  -- Filter out future dates
            ),
            "MonthYear", FORMAT('Financial Datasets'[Date], "mmm yy"),
            "Year", YEAR('Financial Datasets'[Date]),
            "_MonthYearSort", FORMAT('Financial Datasets'[Date], "YYYYmm")
        )
    )

and  

1 ACCEPTED SOLUTION
Deku
Super User
Super User

Use eomonth( today(), 0 )

 

_MonthYearTable = 

    DISTINCT(

        SELECTCOLUMNS(

            FILTER(

                'Financial Datasets',

                'Financial Datasets'[Date] <= EOMONTH(TODAY(),0) 

            ),

            "MonthYear", FORMAT('Financial Datasets'[Date], "mmm yy"),

            "Year", YEAR('Financial Datasets'[Date]),

            "_MonthYearSort", FORMAT('Financial Datasets'[Date], "YYYYmm")

        )

    )


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

View solution in original post

1 REPLY 1
Deku
Super User
Super User

Use eomonth( today(), 0 )

 

_MonthYearTable = 

    DISTINCT(

        SELECTCOLUMNS(

            FILTER(

                'Financial Datasets',

                'Financial Datasets'[Date] <= EOMONTH(TODAY(),0) 

            ),

            "MonthYear", FORMAT('Financial Datasets'[Date], "mmm yy"),

            "Year", YEAR('Financial Datasets'[Date]),

            "_MonthYearSort", FORMAT('Financial Datasets'[Date], "YYYYmm")

        )

    )


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

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.

Top Solution Authors
Top Kudoed Authors