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 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
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 |
|---|---|
| 56 | |
| 42 | |
| 40 | |
| 21 | |
| 21 |
| User | Count |
|---|---|
| 149 | |
| 105 | |
| 63 | |
| 36 | |
| 36 |