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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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