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
ninsights
Helper III
Helper III

Show Data for the Latest Date BUT also let the user pick an historical date

I have a data set which contains multiple snapshots (over time) of active employees. Each snapshot that I took has an [As of Date].

 

ninsights_0-1655381713590.png

I can display the latest list of employees by filtering on [Is Latest date] = "Latest Date". This has been displayed on one tab.
The formula for [Is latest Date] is the following.
Is Latest Date = if('Historical Headcount Data Files'[As Of Date] = max('Historical Headcount Data Files'[As Of Date]),"Latest Date","Not Latest Date")

I can also display historical data by letting the user pick a date from the [As Of Date] filter but I've had to put this on a second tab since the first tab is filtered to the last date.

So, I end up with one tab for the current list and a second tab if they want to see the list as of a past date.

My question is, can this be done on one tab? I would like the tab to DEFAULT to the latest snapshot date but allow the user to change the view to a past date. I cannot just set the tab to the latest date I have as of today since I will take an employee snapshot at the end of each month going forward.

I have several tabs where I need to show current and give the option to put a historical date, so I thought I'd ask this question before I duplicate many tabs (current and historical).

If it matters, users access this dashboard through Microsoft Teams and they will not be knowledgable enough for me to tell them  to turn off a "latest date" filter nor do I expect them to remember to turn it back on to see current employees the next month.

Thank you for an advice.

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Create a calculated column as text that either says  "Latest" or the textual representation of the other dates.  Use that column for your slicer. Set the default slicer value to "Latest".  Publish the report.

 

Now whenever the user opens the report it will automatically default to the latest value, but the user can also change the slicer to any other historical value.

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

Create a calculated column as text that either says  "Latest" or the textual representation of the other dates.  Use that column for your slicer. Set the default slicer value to "Latest".  Publish the report.

 

Now whenever the user opens the report it will automatically default to the latest value, but the user can also change the slicer to any other historical value.

Thank you @lbendlin !

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.