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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
igordossantos
Helper I
Helper I

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

@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...

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

7 REPLIES 7

@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?)

 


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

"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 😞

@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...

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

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.

@Greg_Deckler

 

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

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.

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.

 

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors