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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.