Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
105 | |
79 | |
69 | |
62 |
User | Count |
---|---|
142 | |
105 | |
103 | |
84 | |
70 |