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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
GON76
Helper III
Helper III

Using two conditions to return a specific value

I am trying to use two conditions to return a value.  I'm using the following formula:

 

Compliance Status =
IF(OR
    ('V_ENROLLMENTS'[EXITDATE].[Date] < EDATE(TODAY(), -3), ISBLANK([EXITDATE])),
    "Not Compliant",
    "Compliant"
)
 
I want to show "Not Compliant" for all EXIT dates that are over 3 years old from today and for EXITDATES that are blank.  If the EXITDATE is less than 3 years, and the EXITDATE field is populated, I want it to show "Compliant".  Is my formula correct?
1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Write this calculated column formula

=if(or('V_Enrollments'[Exitdate]=blank(),'V_Enrollments'[Exitdate]<=edate(today(),-36)),"Not compliant","Compliant")

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

9 REPLIES 9
v-priyankata
Community Support
Community Support

Hi @GON76 

Thank you for reaching out to the Microsoft Fabric Forum Community.

@andrewsommer @MohamedFowzan1 @Ashish_Mathur @Bmejia Thanks for your inputs.

I hope the information shared by other users was helpful. Have you had a chance to try it? Are you experiencing any other issues? If you have more questions, feel free to ask the community.

 

Hi @GON76 

I wanted to check if you had the opportunity to review the information provided by users. Please feel free to contact us if you have any further questions.

 

Hi @GON76 

Hope everything’s going smoothly on your end. I wanted to check if the issue got sorted. if you have any other issues please reach community.

Ashish_Mathur
Super User
Super User

Hi,

Write this calculated column formula

=if(or('V_Enrollments'[Exitdate]=blank(),'V_Enrollments'[Exitdate]<=edate(today(),-36)),"Not compliant","Compliant")

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Bmejia
Super User
Super User

GON76, 

I believe you just need to change the -3 to -36, because Edate is base on months so 36 months would be 3 years.


I just tried that and nothing seems to have changed

 

andrewsommer
Super User
Super User

Try this:

Compliance Status =
IF (
    OR (
        'V_ENROLLMENTS'[EXITDATE] < DATE(YEAR(TODAY()) - 3, MONTH(TODAY()), DAY(TODAY())),
        ISBLANK('V_ENROLLMENTS'[EXITDATE])
    ),
    "Not Compliant",
    "Compliant"
)

Please mark this post as a solution if it helps you. Appreciate Kudos.

Do I need to do something when I make an update to a table in order to get it to reflect on my report view?  I'm still seeing Compliant when the EXITDATE is missing.

Could you debug using a calculated column and confirm if the dax is actually reading these dates as blank using the below:
CheckBlank = IF(ISBLANK('V_ENROLLMENTS'[EXITDATE]), "Blank", "Not Blank")

Try this as well to confirm:
Compliance Status =
IF (
ISBLANK('V_ENROLLMENTS'[EXITDATE]),
"EXIT Date Missing",
IF(
'V_ENROLLMENTS'[EXITDATE] < DATE(YEAR(TODAY()) - 3, MONTH(TODAY()), DAY(TODAY())),
"Not Compliant",
"Compliant"
)
)

and proceed with

Compliance Status =
IF (
ISBLANK('V_ENROLLMENTS'[EXITDATE]), 
"Not Compliant",
IF(
'V_ENROLLMENTS'[EXITDATE] < DATE(YEAR(TODAY()) - 3, MONTH(TODAY()), DAY(TODAY())),
"Not Compliant",
"Compliant"
)
)

Incase you were able to pinpoint the issue for the blank dates and it has any other value use || and handle it along with ISBLANK
Let us know if you were able to debug the issue by any chance

Helpful resources

Announcements
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.