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
CRamirez
Advocate II
Advocate II

Dynamic "last 12 calendar months" including current month default slicer selection

Question is largely in the title, but I'm looking for a way to have the last 12 - 13 months as a default slicer selection for my users. This is not accomplished through relative date filtering as I do not know of a way to simultaneously have "Last 12 Months (Calendar)" OR "This Month" in the same selection.

 

For example, ideally today (3/17/2020) the slicer would display 3/1/2019 - 3/16/2020, which could then be manipulated by users if they need.

 

This is also not possible through the "Between" option on a date slicer as the defaulted beginning and ending points are not dynamic which leads to the default filter eventually being months in the past everytime a user opens the report.

 

I also do not want this to be forced into a measure through time intelligence as I want my users to be able to select varying timeframes on their own (for instance if they wanted to look at the last 3 months instead). Everything I've found so far in my research has "hard-coded" a specific timeframe within it.

 

Is there any possible way in Power BI currently to meet this need? It seems like quite a basic feature and I know it's possible in SSRS, but I'm having no luck trying to accomplish this in Power BI.

 

1 ACCEPTED SOLUTION
v-deddai1-msft
Community Support
Community Support

Hi @CRamirez ,

 

You can create a calculated table for the slicer to show all dates from the past year to yesterday:

 

 

Table = CALENDAR(date(YEAR(TODAY())-1,MONTH(TODAY()), 1),TODAY()-1)

 

 

Untitled picture.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

 

View solution in original post

1 REPLY 1
v-deddai1-msft
Community Support
Community Support

Hi @CRamirez ,

 

You can create a calculated table for the slicer to show all dates from the past year to yesterday:

 

 

Table = CALENDAR(date(YEAR(TODAY())-1,MONTH(TODAY()), 1),TODAY()-1)

 

 

Untitled picture.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

 

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.