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! Get ahead of the game and start preparing now! Learn more
I have a date column titled "Scheduled Start Date" for millions of columns in Power Query. I want to calculate the number of days prior to the "Schedule Start Date".
I tried to formulas for the result always returns an error message:
Date.AddDays([Scheduled Start],-27,MONTH))
Could someone help me here at your convenience 🙂
Hi @mdrammeh,
The syntax of the Date.AddDays() function is Date.AddDays(dateTime, days as number), so you need to modify the expression like this Date.AddDays([Scheduled Start],-27).
As you mentioned you want to calculate the number of days prior to the "Schedule Start Date", I guess the Duration.TotalDays should be more proper, see: DATEDIFF in Power Query.
Best Regards,
Qiuyun Yu
Probably you mean rows instead of columns.
Anyhow: remove ",MONTH)" from the formula (or use Date.AddMonths).
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 33 | |
| 29 |
| User | Count |
|---|---|
| 134 | |
| 96 | |
| 78 | |
| 67 | |
| 65 |