Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hi
I created a column with date difference, like this:
But there is an error. The difference is 30 days, not 29. I tried this
Thanks for some help
eduardo
Solved! Go to Solution.
Hi @eduardo,
In Query Editor, when we create a calculated column by using 'Add Custom Column', we need to write formula use Power Query Formula Language. In your scenario, to calculate the difference between start date and end date with day interval, you can use Duration.Days() and Duration.From() functions like below, you can also plus "1" at the end of the formula. For more information about function, see: Duration functions.
=Duration.Days(Duration.From([End date]-[Start Date]))
In your scenario, if you minus directly, it will return values which are not numbers, so you cann't plus '1'. But you can change this column data type to number then create another column to plus '1'.
Best Regards,
Qiuyun Yu
Hi @eduardo,
In Query Editor, when we create a calculated column by using 'Add Custom Column', we need to write formula use Power Query Formula Language. In your scenario, to calculate the difference between start date and end date with day interval, you can use Duration.Days() and Duration.From() functions like below, you can also plus "1" at the end of the formula. For more information about function, see: Duration functions.
=Duration.Days(Duration.From([End date]-[Start Date]))
In your scenario, if you minus directly, it will return values which are not numbers, so you cann't plus '1'. But you can change this column data type to number then create another column to plus '1'.
Best Regards,
Qiuyun Yu
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 43 | |
| 38 | |
| 35 | |
| 21 | |
| 15 |
| User | Count |
|---|---|
| 63 | |
| 58 | |
| 28 | |
| 27 | |
| 25 |