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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
GeorgeR1
Frequent Visitor

Custom Column in PowerBI to calculate number of dates which are more than 3 months before today

I am using a calculated column in PowerBI to identify whethere a date is older than 3 months from today.

 

My table is like so:

 

Date

30 July 2022
30 July 2022
30 July 2022
15 October 2021
28 February 2022
29 June 2020
29 December 2021

 

I am currently doing this manually, by entering the day that is 3 months ago, however I want to automate this so no manual adjustment. I have written as follows:

 

Current Action Status =
IF(Actions[Action Due Date]<=date(2021,11,10),"Overdue by 3+ Months",
IF(Actions[Action Due Date]<today(),"Overdue",
IF(EOMONTH(Actions[Action Due Date],0)=EOMONTH(TODAY(),0),"Due This Month","Due Later"
)
)
)
 
 
I want to replace the date(2021,11,10) with something that calculates Today - 3 months.
1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @GeorgeR1 ,

 

This is something I would do in Power Query if possible. This will save the end user having to materialise calculated columns in memory at runtime, and I also personally find it much simpler to write.

 

Something like this in a new custom column should do it:

let
  Date.Today = Date.From(DateTime.LocalNow())
in
if [Action Due Date] <= Date.AddMonths(Date.Today, -3) then "Overdue by 3+ Months"
else if [Action Due Date] < Date.Today then "Overdue"
else if Date.EndOfMonth([Action Due Date]) = Date.EndOfMonth(Date.Today) then "Due This Month"
else "Due Later"

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

2 REPLIES 2
BA_Pete
Super User
Super User

Hi @GeorgeR1 ,

 

This is something I would do in Power Query if possible. This will save the end user having to materialise calculated columns in memory at runtime, and I also personally find it much simpler to write.

 

Something like this in a new custom column should do it:

let
  Date.Today = Date.From(DateTime.LocalNow())
in
if [Action Due Date] <= Date.AddMonths(Date.Today, -3) then "Overdue by 3+ Months"
else if [Action Due Date] < Date.Today then "Overdue"
else if Date.EndOfMonth([Action Due Date]) = Date.EndOfMonth(Date.Today) then "Due This Month"
else "Due Later"

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Brilliant, thank you. This is exactly what I was looking for. 

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.