cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
ninsights
Helper II
Helper II

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors