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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
charlottesmn
Frequent Visitor

Relative Date based on Last Activity

Hello,

 

On a report I am using a relative date slicer such that the user can selected, for example, the last 3 months of data. Instead, I would like to do the last 3 months of data since the last game date for the current player because different players are playing at different period of time making the current filter tricky.

 

Is there a way to do that in Power BI?

Thank you

1 ACCEPTED SOLUTION

I was able to solve this topic using the PowerBI Preselected slicer visual. Thank you

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

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-da...
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!

Playergame_datexytypespeedheightmetric1metric2metric3
P15/1/2023-0.173.32Type13020102030
P15/2/20233.30.15Type24025152535
P16/1/20230.14Type1503123040
P26/2/20230.23Type33035153530
P21/1/20230.41Type27030202540
P22/28/20230.23Type49020303040

charlottesmn_0-1697436797065.png

 

I was able to solve this topic using the PowerBI Preselected slicer visual. Thank you

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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