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! Get ahead of the game and start preparing now! Learn more
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! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 37 | |
| 33 | |
| 29 | |
| 26 |
| User | Count |
|---|---|
| 134 | |
| 104 | |
| 63 | |
| 60 | |
| 55 |