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
GON76
Helper III
Helper III

How to show "Not Compliant" for a date that is before a date in a column

I want to display the text "Not Compliant" in the column of  table if the date is before 3 years.  I've been using the following, but I know I'm missing something in the parameter:

 

Learning Path Compliance = IF(([EXITDATE] > The Date),"Not Compliant","Compliant")
 
I'm not sure what I should replace "The Date" with or which formula I should be using.
 
Thanks!
4 ACCEPTED SOLUTIONS

Hi Royel, thanks for your response.  I tried using your statement using my column [EXITDATE], and I'm getting an error that says "The first argument to 'DATEADD' must specify a column." Do I need to reference the column again?

 

Compliance Status =
IF(
    [EXITDATE] < DATEADD(TODAY(), -3, YEAR),
    "Not Compliant",
    "Compliant"
)

View solution in original post

Hi Royel, I used EDATE rather than DATEADD, and removed "YEAR" and I got it to work. Thanks for pointing me in the right direction!

View solution in original post

Hi @GON76,

 

Thank you for reaching out to the Microsoft Fabric Forum Community, and special thanks to @Royel  and @danextian  for prompt and helpful responses.

 

Glad to hear it's working well for you! When you have a moment, could you please mark the relevant response as the accepted solution? This helps others in the community who might face a similar issue to find the answer more easily.

 

Thanks & Regards,

Prasanna Kumar

View solution in original post

@GON76  Great, I am so glad you solved it.

View solution in original post

7 REPLIES 7
danextian
Super User
Super User

Hi @GON76 

How do you define "date is before 3 years"? What is the date reference date - today, selected date in the slicer?





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hi Dane, thanks so much for responding. I'm trying to put this column in a pivot table so I'm not using a slicer.  The reference date would be today's date.

Royel
Solution Sage
Solution Sage

Hi, @GON76 Thanks for your question. 

You want to show "Not Compliant" for dates before a certain threshold (3 years), try this Calculated Column Dax 

Compliance Status = 
IF(
    [YourDateColumn] < DATEADD(TODAY(), -3, YEAR),
    "Not Compliant",
    "Compliant"
)

 Find this helpful? ✔ Give a Kudo • Mark as Solution – help others too!

Hi Royel, thanks for your response.  I tried using your statement using my column [EXITDATE], and I'm getting an error that says "The first argument to 'DATEADD' must specify a column." Do I need to reference the column again?

 

Compliance Status =
IF(
    [EXITDATE] < DATEADD(TODAY(), -3, YEAR),
    "Not Compliant",
    "Compliant"
)

Hi Royel, I used EDATE rather than DATEADD, and removed "YEAR" and I got it to work. Thanks for pointing me in the right direction!

@GON76  Great, I am so glad you solved it.

Hi @GON76,

 

Thank you for reaching out to the Microsoft Fabric Forum Community, and special thanks to @Royel  and @danextian  for prompt and helpful responses.

 

Glad to hear it's working well for you! When you have a moment, could you please mark the relevant response as the accepted solution? This helps others in the community who might face a similar issue to find the answer more easily.

 

Thanks & Regards,

Prasanna Kumar

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.

Users online (1,371)