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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
varundathi
New Member

Default dynamic last 365 days between slicer in a page

Hello @PowerBI,

I have created a page with multiple visuals like bar, Line and Table and showing data according to my requiremet. Now the issue is I would liek to place a slicer so that it should show only last 365 days whenever I login. This can be achievable by relative date filter but the issue here is if I would like to go back to previous years the slicer is showing only last 365 days as I have applied filter for last 365 days. My concern here is 

  1. Automatically show the last 1 year of data when the report is opened.

  2. Allow users to freely explore all available dates (e.g., from 2010 onwards) using a date slicer.

  3. Achieve this behavior using only calculated columns or measures (no bookmarks/buttons).

  4. Keep the default filter dynamic (so "last 1 year" means 1 year from today, even if it's opened tomorrow).

  5. If I would like to select other dates, the visuals should interact with filter accordingly.

Approch I tried: 

I have created Bookmarks and buttons to show last 365 days and go back to full dates view so that we can be able to filter for the dates which ever we want.

 

Need solution:

Now I would like to achieve it using calculated columns or measure. or anyother simpler approach which we can do.

 

1 ACCEPTED SOLUTION
v-pgoloju
Community Support
Community Support

Hi @varundathi,

 

Thank you for reaching out to the Microsoft Fabric Forum Community.

 

ShowLast365 =
VAR _Today = TODAY()
VAR _Last365Start = _Today - 365
VAR _IsFiltered = ISFILTERED('Date'[Date])
RETURN
IF (_IsFiltered,1, IF (MAX('Date'[Date]) >= _Last365Start && MAX('Date'[Date]) <= _Today, 1,0))

 

If this solution helped, please consider marking the response as accepted and giving it a thumbs-up so others can benefit as well.

 

Best regards,
Prasanna Kumar

 

View solution in original post

4 REPLIES 4
v-pgoloju
Community Support
Community Support

Hi @varundathi,

 

Just a gentle reminder  has your issue been resolved? If so, we’d be grateful if you could mark the solution that worked as Accepted Solution, or feel free to share your own if you found a different fix.

This not only closes the loop on your query but also helps others in the community solve similar issues faster.

Thank you for your time and feedback!

 

Best,

Prasanna Kumar

v-pgoloju
Community Support
Community Support

Hi @varundathi,

 

We wanted to kindly check in to see if everything is working as expected after trying the suggested solution. If there’s anything else we can assist with, please don’t hesitate to ask.

If the issue is resolved, we’d appreciate it if you could mark the helpful reply as Accepted Solution  it helps others who might face a similar issue.

 

Warm regards,

Prasanna Kumar

v-pgoloju
Community Support
Community Support

Hi @varundathi,

 

Just following up to see if the solution provided was helpful in resolving your issue. Please feel free to let us know if you need any further assistance.

If the response addressed your query, kindly mark it as Accepted Solution and click Yes if you found it helpful  this will benefit others in the community as well.

 

Best regards,

Prasanna Kumar

v-pgoloju
Community Support
Community Support

Hi @varundathi,

 

Thank you for reaching out to the Microsoft Fabric Forum Community.

 

ShowLast365 =
VAR _Today = TODAY()
VAR _Last365Start = _Today - 365
VAR _IsFiltered = ISFILTERED('Date'[Date])
RETURN
IF (_IsFiltered,1, IF (MAX('Date'[Date]) >= _Last365Start && MAX('Date'[Date]) <= _Today, 1,0))

 

If this solution helped, please consider marking the response as accepted and giving it a thumbs-up so others can benefit as well.

 

Best regards,
Prasanna Kumar

 

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

Check out the May 2025 Power BI update to learn about new features.

May 2025 Monthly Update

Fabric Community Update - May 2025

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