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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
lucpaymetals
Frequent Visitor

Current Month Button

Hello,

I am having some trouble.

I need a button that if you click on it, it will filter everything by the current month. 

Does anyone know how todo this. 

Also if there is a way todo this for current day and week that would be super helpful.

Thank you.

1 ACCEPTED SOLUTION
jaweher899
Impactful Individual
Impactful Individual

This can be achieved using a DAX formula and creating a calculated column, or using a measure and creating a button that selects the current month when clicked. Here is an example of a DAX formula for a calculated column that returns the current month:

=IF(MONTH(TODAY())=MONTH([Date]),1,0)

In this formula, the TODAY() function returns the current date, and the MONTH function returns the current month number. The IF function checks if the current month number is equal to the month number of the date in the [Date] column, and returns 1 if it is, and 0 otherwise.

Once you have created the calculated column, you can use it to create a slicer that filters the report to only show the current month. You can also create a button that toggles the selection in the slicer, so that when it is clicked, it selects the current month.

View solution in original post

2 REPLIES 2
jaweher899
Impactful Individual
Impactful Individual

This can be achieved using a DAX formula and creating a calculated column, or using a measure and creating a button that selects the current month when clicked. Here is an example of a DAX formula for a calculated column that returns the current month:

=IF(MONTH(TODAY())=MONTH([Date]),1,0)

In this formula, the TODAY() function returns the current date, and the MONTH function returns the current month number. The IF function checks if the current month number is equal to the month number of the date in the [Date] column, and returns 1 if it is, and 0 otherwise.

Once you have created the calculated column, you can use it to create a slicer that filters the report to only show the current month. You can also create a button that toggles the selection in the slicer, so that when it is clicked, it selects the current month.

Hi, I have this problem related to this issue. My dashboard has KPIs that show variations compared to the previous year. When I select the filter with the current month, the variations are empty since my date dimensional table would only be showing the current month. Any solution to this? Thanks 🙂

Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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