Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
Solved! Go to Solution.
Duration.Days needs to have only one parameter.
You will need to replace it with
Duration.Days(EndDt-StartDt)
Also note, you need not use EndDt as date in your function as anyway you are getting the value from another query. This is redundant. Below would work perfectly
(StartDt as date) =>
let
EndDt =TodaysDate,
Age = Duration.Days(EndDt - StartDt)
in
Age
The above query can be simply written as
(StartDt as date) => Duration.Days(TodaysDate - StartDt)
Duration.Days needs to have only one parameter.
You will need to replace it with
Duration.Days(EndDt-StartDt)
Also note, you need not use EndDt as date in your function as anyway you are getting the value from another query. This is redundant. Below would work perfectly
(StartDt as date) =>
let
EndDt =TodaysDate,
Age = Duration.Days(EndDt - StartDt)
in
Age
The above query can be simply written as
(StartDt as date) => Duration.Days(TodaysDate - StartDt)
Thank you Vijay! I am annoyed at myself for missing that obvious error! I was looking in the wrong place!
Your improved code also helps so thank you for that too. 😎
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 11 | |
| 8 | |
| 5 | |
| 5 | |
| 5 |