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

Return if one condition OR another is met

I am trying to create a column that returns if a project is "expired" or "not expired."  (My column C)

If the permit start date is less than (before) to the construction start date OR if the construction start date is blank and the permit start date is less than (before/has passed) today it is expired.

 

Permit Start DateConstruction Start DateNew Column (Expired or Not Expired)
What I am trying to create
6/24/2023 Expired
1/2/202212/30/2021Not Expired
5/3/20245/15/2024Expired
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @lynnzrae 

This DAX only works in Measure creation, if you want to achieve this effect in Calculate column you can use the following DAX.

vyaningymsft_0-1719973123533.png

DAX:

Condition column = 
IF (
    [Permit Start] < [DateConstruction],
    "Expired",
    IF (
        [DateConstruction] = BLANK ()
            && [DateConstruction] < TODAY (),
        "Expired",
        "Not Expired"
    )
)

 

Best Regards,
Yang

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. 
Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

4 REPLIES 4
lynnzrae
Helper I
Helper I

the above didn't return the correct values but I massaged the two formulas together and got what I needed so I am good to go.  Thank you for your help!

Anonymous
Not applicable

Hi, @lynnzrae 

You can try the following measure to solve the problem.

vyaningymsft_0-1719883872900.png

Measure:

Condition = 
VAR _permitStart =
    SELECTEDVALUE ( 'Table'[Permit Start] )
VAR _dateConstruction =
    SELECTEDVALUE ( 'Table'[DateConstruction] )
VAR _today =
    TODAY ()
VAR _result =
    IF (
        HASONEVALUE ( 'Table'[DateConstruction] ),
        IF (
            ( _permitStart < _dateConstruction )
                || (
                    ISBLANK ( _dateConstruction )
                        && _permitStart < _today
                ),
            "Expired",
            "Not Expired"
        )
    )
RETURN
    _result

 

Best Regards,
Yang

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

I copy and pasted and it accepted the formula but it returned empty cells

 

I have my column with no errors but everything under the column header is blank

 

 

Anonymous
Not applicable

Hi, @lynnzrae 

This DAX only works in Measure creation, if you want to achieve this effect in Calculate column you can use the following DAX.

vyaningymsft_0-1719973123533.png

DAX:

Condition column = 
IF (
    [Permit Start] < [DateConstruction],
    "Expired",
    IF (
        [DateConstruction] = BLANK ()
            && [DateConstruction] < TODAY (),
        "Expired",
        "Not Expired"
    )
)

 

Best Regards,
Yang

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. 
Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

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.