Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi,
I'm getting an error with the below script and I can't see why its comming up. Can anyone please correct me on this?
if TERMINATION DATE = 31/12/4721 then
Duration.Days(Date.From(DateTime.LocalNow()) - [CONTINUOUS SERVICE DATE]) /12)
else
Duration.Days([TERMINATION DATE]-[CONTINUOUS SERVICE DATE])/12)
Solved! Go to Solution.
Update, solved it myself as below
if [TERMINATION DATE] = #date(4721, 12, 31) then
Duration.Days(Date.From(DateTime.LocalNow()) - [CONTINUOUS SERVICE DATE]) /12
else
Duration.Days([TERMINATION DATE]-[CONTINUOUS SERVICE DATE])/12
Update, solved it myself as below
if [TERMINATION DATE] = #date(4721, 12, 31) then
Duration.Days(Date.From(DateTime.LocalNow()) - [CONTINUOUS SERVICE DATE]) /12
else
Duration.Days([TERMINATION DATE]-[CONTINUOUS SERVICE DATE])/12
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 52 | |
| 34 | |
| 33 | |
| 17 | |
| 17 |
| User | Count |
|---|---|
| 61 | |
| 60 | |
| 39 | |
| 26 | |
| 24 |