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've created at Holiday table in excel, trying to use to determine work days between two dates. Looks like everywhere the date column is date format (both in the excel file, and after importing) but I get error in PowerBi desktop of Invalid representation of date in the statement for the Table1[Date] field.
CalcBusDays = CALCULATE(sum(Table1[IsWorkDay]),DATESBETWEEN(Table1[Date],Query[FileDate],Query[DateEntered]))
Solved! Go to Solution.
Thanks for the help. Table1 is a calendar table, but I found that the first date being passed was earlier than the first date in the table. The message indicating "invalid date representation" seemed like there was a problem with the data format of the column in the calendar table. I further reviewed the table with the dates being passed and found the unexpected dates. I expanded the calender table and all worked.
Is table1 a calendar table? Datesbetween is designed to be used over calendar tables. You need to pass a start date and an end date, but you are passing columns of dates - you can't do that. Try wrapping the 2 query columns in MIN for the starting column and MAX for the end column.
Thanks for the help. Table1 is a calendar table, but I found that the first date being passed was earlier than the first date in the table. The message indicating "invalid date representation" seemed like there was a problem with the data format of the column in the calendar table. I further reviewed the table with the dates being passed and found the unexpected dates. I expanded the calender table and all worked.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 58 | |
| 45 | |
| 42 | |
| 21 | |
| 18 |