Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
samuelyesudian
Regular Visitor

An argument of function 'DATE' has the wrong data type or the result is too large or too small.

I have a measure which takes max date from a table and then works out different time intelligence.  It was working fine and ti started giving error.

 

samuelyesudian_0-1701214416389.png

If I change var Tdy = Today() it works, but it is not accepting Today() -1.  I need the last tdate from the table to be the base or I need a calculation to be applied to Today

 

Any help is appreciated

1 ACCEPTED SOLUTION
samuelyesudian
Regular Visitor

This maybe useful for someone, I finally managed the figure out the problem.  The error was happening downstream the code and it was due to a calculation Date(Year(RptDate), Month(RptDate), Day(RptDate)-28)..Strongly recommend do not deduct days like this, as based on the current date eg it was 28th Nov today, the day return 0 causing the error.  

 

Its difficult to trouble shoot as Dax does not highlight the row where the error occurs.

View solution in original post

1 REPLY 1
samuelyesudian
Regular Visitor

This maybe useful for someone, I finally managed the figure out the problem.  The error was happening downstream the code and it was due to a calculation Date(Year(RptDate), Month(RptDate), Day(RptDate)-28)..Strongly recommend do not deduct days like this, as based on the current date eg it was 28th Nov today, the day return 0 causing the error.  

 

Its difficult to trouble shoot as Dax does not highlight the row where the error occurs.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.