Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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
Automatically show the last 1 year of data when the report is opened.
Allow users to freely explore all available dates (e.g., from 2010 onwards) using a date slicer.
Achieve this behavior using only calculated columns or measures (no bookmarks/buttons).
Keep the default filter dynamic (so "last 1 year" means 1 year from today, even if it's opened tomorrow).
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.
Solved! Go to Solution.
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
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
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
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
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
User | Count |
---|---|
17 | |
16 | |
14 | |
14 | |
13 |
User | Count |
---|---|
14 | |
12 | |
12 | |
8 | |
7 |