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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Pan_Forex
Helper III
Helper III

filter 3 months and average

Hello! I have a simple visualization with two columns, player and score. 

Score =
VAR _score = AVERAGEX (TOPN (30,'table','table'[id]), 'table'[score])
return  _score

I would like my table to include only players who have played a minimum of one [id] in the last 3 months counting from today. A simple filter and setting of the last 3 months will not work in my case.
1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @Pan_Forex ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_0-1687484508249.png

Please try to apply this measure to the visual's filter:

Flag = COUNTROWS(FILTER('Table',[date]>=EDATE(TODAY(),-3)&&[date]<=TODAY()))

vjianbolimsft_1-1687484567947.png

Final output:

vjianbolimsft_2-1687484584361.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
devanshi
Helper V
Helper V

Count of ID = COUNT('Table'[ID])
Maxdate = MAX('Table'[Date])
Minimum Played Player = 
FILTER('Table', Count of ID > 0 && Maxdate >= TODAY() - 90 && Maxdate <= TODAY())

v-jianboli-msft
Community Support
Community Support

Hi @Pan_Forex ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_0-1687484508249.png

Please try to apply this measure to the visual's filter:

Flag = COUNTROWS(FILTER('Table',[date]>=EDATE(TODAY(),-3)&&[date]<=TODAY()))

vjianbolimsft_1-1687484567947.png

Final output:

vjianbolimsft_2-1687484584361.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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