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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mohit_K
Helper I
Helper I

How to set a date slicer to current month by default so that it can be dynamic for coming months?

Hi,

 

I have a date slicer with two years of data. I want set the slicer to current month by default so that when the month changes I will not have to republish the report.

 

When the end user opens the report, he should be able to view the current month data by default. If the user wants to view the report for the previous months then he can use the date slicer for that. But by deafult he should see current month only.

 

So when the month changes, the report should also dynamically change.

 

Regards,

Mohit

3 REPLIES 3
v-jingzhang
Community Support
Community Support

Hi @mohit_K 

 

Currently Power BI doesn't support to set the slicer to current month by default. There are several ideas about this requirement as below. You can vote them up and see comments there. 

Microsoft Idea - Default Selected Slicer or Tile-By Value Configuration

Microsoft Idea - Dynamic Date Slicer (improve relative date slicer)

Microsoft Idea - Dynamic Slicer

 

The current workarounds are similar to the method Amit has provided. This is another example Set Default Slicer Selection to Current Year or Month in Power BI - YouTube

 

To let end users know which current month it is, you may add a measure to show current month name and display it in a card visual on report page. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

mohit_K
Helper I
Helper I

@amitchandak we tried this method but from the end user point of view it seems to be a bit confusing. The end user should simply see the names of the months. 

amitchandak
Super User
Super User

@mohit_K ,  You need to create a static column for This month and last month and save page with that value in the slicer. Using a function or measure we can not do that as of nwo

 

 

A new column in date table of table in use

 

Month Type = Switch( True(),
eomonth([Date],0) = eomonth(Today(),-1*month(Today())),"Last year Last Month" ,
eomonth([Date],0) = eomonth(Today(),-1),"Last Month" ,
eomonth([Date],0)= eomonth(Today(),0),"This Month" ,
Format([Date],"MMM-YYYY")
)

 

 

save on this month

 

Default Date Today/ This Month / This Year: https://www.youtube.com/watch?v=hfn05preQYA

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.