March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
HI,
I'm a beginner at Power BI and I'm not so good at Dax.
I am trying to create a custom column where it states whether someone is a leaver from 6 years ago or not.
Everything I try is wrong!
if [leavedate] = <= DateTime.Date(DateTime.LocalNow())-6 then "Legacy Leaver" else "null")
Any suggestions?
Solved! Go to Solution.
Hi @randomfluky1 , you need to create this formule in Power Query (add a Custom Column):
if Duration.TotalDays((DateTime.Date(DateTime.LocalNow())-[leavedate])/365)>=6 then "Legacy Leaver" else "null"
The result:
Best Regards
Thank you
Hi @randomfluky1 , you need to create this formule in Power Query (add a Custom Column):
if Duration.TotalDays((DateTime.Date(DateTime.LocalNow())-[leavedate])/365)>=6 then "Legacy Leaver" else "null"
The result:
Best Regards
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
91 | |
89 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
72 | |
68 |