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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Filter data with last 15 months

Hello All,
I want to filter data with last 15 months of data from max date
Please help

Thanks!

1 ACCEPTED SOLUTION
fahadqadir3
Super User
Super User

@Anonymous  You can create a new Custom Column in Power Query to present months difference from Max Date Month by using the following Power Query Formula

Filter 15 Months from Max Date.png

Date.Month([Date]) - Date.Month(List.Max(#"Sorted Rows"[Date])) + 
(Date.Year([Date]) - Date.Year(List.Max(#"Sorted Rows"[Date]))) * 12

greater than  15 days.png

Then apply a Filter on new column where months difference is greater than -15, so that only last 15 months data should be availble to use.

 

Regards,

Fahad Qadir

Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!

View solution in original post

2 REPLIES 2
fahadqadir3
Super User
Super User

@Anonymous  You can create a new Custom Column in Power Query to present months difference from Max Date Month by using the following Power Query Formula

Filter 15 Months from Max Date.png

Date.Month([Date]) - Date.Month(List.Max(#"Sorted Rows"[Date])) + 
(Date.Year([Date]) - Date.Year(List.Max(#"Sorted Rows"[Date]))) * 12

greater than  15 days.png

Then apply a Filter on new column where months difference is greater than -15, so that only last 15 months data should be availble to use.

 

Regards,

Fahad Qadir

Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!

kpost
Super User
Super User

Are you meaning the last 15 calendar months?  Or are you meaning (15months)*(~30days/month) = ~450 days?

Are you wanting this as a DAX measure or a visual-level filter or a page-level filter or a report-level filter?  Are you wanting to screen out data older than 15 months at the import level using Power Query?


When you say "max date" are you referring to a date selected in a slicer, or are you referring to today's date (whatever that happens to be), or are you referring to the latest date found in a certain table?

 

More information about the exact problem you're trying to solve is going to help us answer your question.  As much as you can provide.

 

///Mediocre Power BI Advice, but it's free///

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.

Top Solution Authors
Top Kudoed Authors