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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
astridaku
New Member

Last month

Hello,

 

I am pretty new to dax and your help will be appreciated.

 

I have a table and I need to filter the data from this month.

 

I have no clue how to do it. 

 

thanks in advance!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@astridaku You can accomplish this by adding a calculated column to your table. Use the following dax calc and set your outputs to identify the current month.

IsCurrentMonth = IF(MONTH(test[Date])=Month(NOW()), "Current Month", "Other")

or rather than text I usually just use bits 1,0 if I'm just filtering on the back end (not in slicers)

IsCurrentMonth = IF(MONTH(test[Date])=Month(NOW()), 1, 0)

 

Then in your page/report/visual you can filter to only show current, or use a slicer

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

@astridaku You can accomplish this by adding a calculated column to your table. Use the following dax calc and set your outputs to identify the current month.

IsCurrentMonth = IF(MONTH(test[Date])=Month(NOW()), "Current Month", "Other")

or rather than text I usually just use bits 1,0 if I'm just filtering on the back end (not in slicers)

IsCurrentMonth = IF(MONTH(test[Date])=Month(NOW()), 1, 0)

 

Then in your page/report/visual you can filter to only show current, or use a slicer

@Anonymous @astridaku correct me if I am wrong ( I write without testing ) but if you have more than 2 years it will display "current month" for 2 months value. 

Could it be like 

IsCurrentMonth =
IF (
    AND (
        YEAR ( test[Date] ) = YEAR ( NOW () ),
        MONTH ( test[Date] ) = MONTH ( NOW () )
    ),
    "Current Month",
    "Other"
)

 

 

Konstantinos Ioannou
Anonymous
Not applicable

@konstantinos yep - spot on. Your calc will handle multiple years.

Or, in Power Query:

// Power Query
// Add custom column
CurrentMonthFlag =
Date.IsInCurrentMonth( [Date] )

Power Query date built-ins.

the Power Query custom column is much easier !

thanks so much!!!

 

it worked

@astridaku If the solution is working for you please mark it as Answered in order to help other community members.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon & SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.