web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Answered

POWER BI DAX

(0) ShareShare
ReportReport
Posted on by 40

I'm trying to get the remaining years with which a driver's license will expire, i'm making use of the Driver's License Expiry date column in my dataset , I want the column to show negative for the Drivers license that have expired before Today's date. Here is my DAX.  Expiry Year =DATEDIFF(MIN('Employee'[Drivers_License_Expiry_Date], 'Employee'[Today's Date]), MAX('Employee'[Today's Date], 'Employee'[Drivers_License_Expiry_Date]), YEAR)

Categories:
I have the same question (0)
  • Savage76 Profile Picture
    40 on at

    It is not working @Syndicate_Admin 

  • Verified answer
    Savage76 Profile Picture
    40 on at

    It worked perfectly

     

  • Verified answer
    Savage76 Profile Picture
    40 on at

    You can also Concatenate 'YRS' with it ,so it can display the number with 'YRS' afterwards.

     

    Expiry Year = var _expiryYrs = DATEDIFF(MIN('Employee'[Drivers_License_Expiry_Date], 'Employee'[Today's Date]), MAX('Employee'[Today's Date], 'Employee'[Drivers_License_Expiry_Date]), YEAR) RETURN IF ('Employee'[Today's Date] <= 'Employee'[Drivers_License_Expiry_Date], _expiryYrs & " Yrs", -1 * _expiryYrs & " Yrs")

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 610

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard