cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
igordossantos Regular Visitor
Regular Visitor

Keeping most recent value on slicers

All, 

 

Is there a way to somehow keep the most recent values of my slicers, which are month and year slicers, checked?

 

We have reports that have values filtered by slicers, with items from these reports pinned to dashboards. 

 

Because I may not have the most recent value checked on my slicers, my dashboard is not displaying the most recent information when you first look at it. 

 

For mobile users, that's actually being a terrible experience.

 

The source of these reports is a tabular model, connect to data on-prem through the analysis services connector. 

 

Let me know if there's any way to fix this. 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Keeping most recent value on slicers

@Seth_C_Bauer - I am wondering if @igordossantos issue is similar to the issue with Dashboard tiles not refreshing when the year and month change and therefore have to be re-pinned. I believe that @greggyb solved this in another thread. Basically, the idea was to create a column that had a flag if it was the current month and current year and then filter on that instead of the actual month and year.

 

Not sure if this is the problem and having a devil of a time finding that thread.

 

Found it:

http://community.powerbi.com/t5/Desktop/Dashboard-not-update-after-changing-filter-in-power-bi-deskt...

 


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!


7 REPLIES 7
Super User
Super User

Re: Keeping most recent value on slicers

@igordossantos If I understand you correctly, you have fields selected in a slicer, and you want those to automatically update to the latest field when the data is updated? - If that is the case, I'm not aware of how you would accomplish this in slicers.

But you could accomplish this by just using filters on a visual, where the filter is a measure to return the latest date (year or month).

And a pinned visual with this filter would update automatically.

 

I hope I understand what your asking.

 

(Side note, did you figure out the issue with those other 3 users yet?)

 

Near SE WI? Join our PUG Milwaukee Brew City PUG
Super User
Super User

Re: Keeping most recent value on slicers

@Seth_C_Bauer - I am wondering if @igordossantos issue is similar to the issue with Dashboard tiles not refreshing when the year and month change and therefore have to be re-pinned. I believe that @greggyb solved this in another thread. Basically, the idea was to create a column that had a flag if it was the current month and current year and then filter on that instead of the actual month and year.

 

Not sure if this is the problem and having a devil of a time finding that thread.

 

Found it:

http://community.powerbi.com/t5/Desktop/Dashboard-not-update-after-changing-filter-in-power-bi-deskt...

 


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!


igordossantos Regular Visitor
Regular Visitor

Re: Keeping most recent value on slicers

"If I understand you correctly, you have fields selected in a slicer, and you want those to automatically update to the latest field when the data is updated?"

 

@Seth_C_Bauer, sort of. I have slicers representing the Month and Year. Today is February 1st, and I would like to have the month slicer automatically selected to February.

 

I'm going to attempt to perform this change: http://community.powerbi.com/t5/Desktop/Setting-the-Default-Value-of-a-Slicer/td-p/16442

 

@Seth_C_Bauer, still no good on the access issue. I'm working with a Microsoft engineer on the issue Smiley Sad

igordossantos Regular Visitor
Regular Visitor

Re: Keeping most recent value on slicers

@Greg_Deckler

 

I'll try your suggestion as well. What you describe is pretty accurate. 

Highlighted
greggyb New Contributor
New Contributor

Re: Keeping most recent value on slicers

The general rule in PBI is that slicer and filter selections cannot change without user input. If you're embedding in another application, you could certainly pass filter parameters that are updated by code in the hosting application.

 

Within Power BI, the only way to make "dynamic" slicer selections is to make sure your data changes in such a way that the literal value selected in the slicer represents the selection you want. Rather than dynamic slicers and static data (e.g. slicer updates to "2016 February"), we can have static slicers and dynamic data (e.g. slicer always set to "Current month", where data refresh process sets "Current Month" to apply only to February of 2016). @Greg_Deckler has linked to a post describing how you can do this.

SHHargrove Regular Visitor
Regular Visitor

Re: Keeping most recent value on slicers

We're having good luck adding a field to the Time Dimension named "DateLag" whose value is 0 for the current month and grows with each month of history.  Then we filter our reports for DateLag=0. 

 

Rather then writing DAX or MDX for this, we've found it easier to just do it in the ETL (either PowerQuery or SSIS).

 

This approach also makes it quite easy to do things like informing the user of what's different in the world this month from what he saw last month:  i.e. YOY Change in YTD Sales for dateLag=0compared to YOY change in YTD sales for datelag=1.

 

 

igordossantos Regular Visitor
Regular Visitor

Re: Keeping most recent value on slicers

I implemented the idea suggested by @Greg_Deckler and it has been working.

 

We now have two new columns in our Date Dimension called:

 

  • CurrentFiscalPeriod
  • CurrentCalendarPeriod

 

And those are being used on PBI reports. 

 

So far so good and thanks for the great support guys.