Forum Discussion
Relative Date based on Last Activity
- 2 years ago
I was able to solve this topic using the PowerBI Preselected slicer visual. Thank you
Here is some data and a screenshot of a fake report so it might help to understand the situation.
My report page is on the player level so one player must be selected. I then have a date slicer and this is is the one I would like to work on. It is currently set on "Last 6 months" but my issue is that if a player has not played in the last 6 months the report will look empty. This is why I would like the slicer to be the last 6 months since the player last game (most recent game_date).
I was able to apply some kind of filtering following these ideas: https://www.victorrocca.com/solution-last-activity-date/ and https://community.fabric.microsoft.com/t5/Desktop/Required-custom-date-Slicer-Last-7-days-last-15-days-last-30/m-p/1284966#M561629
However these solutions seems to only work on a visual level (I have to add the filter to each graph independently) and I was not able to apply it to visuals not on the game_date granularity (eg. the table or the "x and y" chart).
I hope it helps and thank you for your help!
| Player | game_date | x | y | type | speed | height | metric1 | metric2 | metric3 |
| P1 | 5/1/2023 | -0.17 | 3.32 | Type1 | 30 | 20 | 10 | 20 | 30 |
| P1 | 5/2/2023 | 3.3 | 0.15 | Type2 | 40 | 25 | 15 | 25 | 35 |
| P1 | 6/1/2023 | 0.1 | 4 | Type1 | 50 | 3 | 12 | 30 | 40 |
| P2 | 6/2/2023 | 0.2 | 3 | Type3 | 30 | 35 | 15 | 35 | 30 |
| P2 | 1/1/2023 | 0.4 | 1 | Type2 | 70 | 30 | 20 | 25 | 40 |
| P2 | 2/28/2023 | 0.2 | 3 | Type4 | 90 | 20 | 30 | 30 | 40 |
I was able to solve this topic using the PowerBI Preselected slicer visual. Thank you