Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live 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
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 61 | |
| 48 | |
| 35 | |
| 25 | |
| 23 |
| User | Count |
|---|---|
| 134 | |
| 110 | |
| 59 | |
| 39 | |
| 32 |