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
alawode
Helper I
Helper I

Less than from todays date

Hi Experts,

I am trying to calculate Project end date status based on the days between "todays date" and the amount of days between the "project end date".

For example, if its equal to  or less than 30 days "Expires in One Month". If its equal to or less than 90 days "Expires in 90 days", and if its equals to or less than 180 days "Expires in 6 months" Any help on how to create this calculated column will be appreciated.

Thanks in advance

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Say your table or last step name is Table1. Add a new step named DaysCalc, and in the formula bar, type:


= Table.AddColumn(Table1, "Days", each [project end date] -Date.From(DateTime.LocalNow()))

 

Then

= Table.AddColumn(DaysCalc, "Status", each if [Days] < 31 then "Expires In One Month" else if [Days] < 91 then "Expires In 90 Days" else "Expires in 6 Months")

 

--Nate

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Say your table or last step name is Table1. Add a new step named DaysCalc, and in the formula bar, type:


= Table.AddColumn(Table1, "Days", each [project end date] -Date.From(DateTime.LocalNow()))

 

Then

= Table.AddColumn(DaysCalc, "Status", each if [Days] < 31 then "Expires In One Month" else if [Days] < 91 then "Expires In 90 Days" else "Expires in 6 Months")

 

--Nate

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.