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

Formula for a column to identify dates that are within 180 days from TODAY

I want to create a column that returns if a project will exprire within 180 days and I am not sure if I also need to account for it is expired or if it will fall from the calculation if it is or not.  Would I need "Expired", "Nearing Expiration", "Safe from Expiration"

 

If the permit start date is within 180 days from TODAY and the construction start date is blank it is "Nearing Expiration."  If the permit start date has passed (less than TODAY)  and the construction start date is blank it is "expired."  If the permit start date more than 180 days from TODAY, it is "Safe from Expiration."

 

Can I do this all on one column or do I have to add a column to calculate 180 days from TODAY as well?

 

Permit Start DateConstruction Start DateDo I need a column to calcualte 180 days from Today?Expired, Nearing Expiration, Safe from Expiration
6/24/2023  Expired
6/6/2025  Safe from Expiration
5/3/20244/1/2024 Safe from Expiration
7/15/2024  Nearing Expiration
1 ACCEPTED SOLUTION
Irwan
Super User
Super User

hello @lynnzrae ,

 

please check if this accomodate your need.

Irwan_1-1719962473179.png

 

looking at your provided result, i assumed these categories : 

- permit date less than today and blank construction date = expired

- permit date greater than today and within 180days and blank construction date = nearing expiration

- the rest would be safe from expiration

 

Expired, Nearing Expiration, Safe from Expiration =
IF(
    VALUE('Table'[Permit Start Date])<TODAY() //find permit date less than today
    &&
    'Table'[Construction Start Date]=BLANK(), //check blank construction date
    "Expired",
IF(
    VALUE('Table'[Permit Start Date])>TODAY() //find permit date greater than today
    &&
    ABS(DATEDIFF('Table'[Permit Start Date],TODAY(),DAY))<180 //check if permit date and today are within 180days
    &&
    'Table'[Construction Start Date]=BLANK(), //find blank construction date
    "Nearing Expired",
    "Safe from Expiration"
))
 
Hope this will help you.
Thank you.

View solution in original post

3 REPLIES 3
lynnzrae
Helper I
Helper I

that worked, thank you.  I never would have figured that out on my own.

Hello @lynnzrae 

 

Glad to be a help.

 

Thank you.

Irwan
Super User
Super User

hello @lynnzrae ,

 

please check if this accomodate your need.

Irwan_1-1719962473179.png

 

looking at your provided result, i assumed these categories : 

- permit date less than today and blank construction date = expired

- permit date greater than today and within 180days and blank construction date = nearing expiration

- the rest would be safe from expiration

 

Expired, Nearing Expiration, Safe from Expiration =
IF(
    VALUE('Table'[Permit Start Date])<TODAY() //find permit date less than today
    &&
    'Table'[Construction Start Date]=BLANK(), //check blank construction date
    "Expired",
IF(
    VALUE('Table'[Permit Start Date])>TODAY() //find permit date greater than today
    &&
    ABS(DATEDIFF('Table'[Permit Start Date],TODAY(),DAY))<180 //check if permit date and today are within 180days
    &&
    'Table'[Construction Start Date]=BLANK(), //find blank construction date
    "Nearing Expired",
    "Safe from Expiration"
))
 
Hope this will help you.
Thank you.

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.