Forum Discussion
Keeping most recent value on slicers
- 10 years ago
Anonymous - 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:
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?)
Anonymous - 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:
- igordossantos10 years ago
Helper I
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.
- igordossantos10 years ago
Helper I
- greggyb10 years ago
Resident Rockstar
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.
- SHHargrove10 years ago
Advocate II
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.