This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. 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
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 25 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 61 | |
| 49 | |
| 28 | |
| 23 | |
| 23 |