Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register 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
| User | Count |
|---|---|
| 55 | |
| 37 | |
| 26 | |
| 17 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 58 | |
| 39 | |
| 21 | |
| 21 |