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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
bgonen7
Helper I
Helper I

Divide formula filtering through specific time periods

I have the formula below that works fine when I check the filter : "Revised cleared periods" 

 

the formula goes like this:

 

Avg Receipts =
 DIVIDESUMX('Open AR',[$Group amount]*[Arrears]),SUM([AMOUNT_GROUP_CURR]))
 
All I am trying to do is to add to this formula to filter through most recent 3 months of the column "Revised cleared periods" from the Table: 'Open AR'
2 REPLIES 2
bgonen7
Helper I
Helper I

Thanks for the quick response.

var _max showed no errors but when integrating with var _min it reflected an error.

Anyway, I got an alternate solution (but I might go back to your solution at some point).

 

amitchandak
Super User
Super User

@bgonen7 , You need create a measure like

 

example

 

3 Months=
var _max = maxx(allselected(date),date[date]) // or today()
var _min = date(year(_max), month(_max)-3,1)
return
CALCULATE([Avg Receipts],filter(date, date[date] <=_max && date[date] >=_min))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Kudoed Authors