Forum Discussion

jitchen's avatar
jitchen
New Member
3 years ago
Solved

DirectQuery with Date Function in PowerBi

Hi, not sure is there anyone faced this issue before. 

 

Before this I have no issue using Date(year,month,day) function with DirectQuery(Connect to SQL Server).

Currently it pops up this error:

Cannot construct data type date. some of the arguements have values which are not valid. The exception was raised by the IDbCommand interface.

 

Can anyone know what is the issue and how to solve it ?

3 Replies

  • Probably bad data, like February 29th 2023.

    • jitchen's avatar
      jitchen
      New Member

      Ya, I think this was the issue. I convert the date format via view there is no such issue.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi jitchen ,

        Whether your problem has been resolved? If yes, could you please mark the helpful post as Answered? It will help the others in the community find the solution easily if they face the same problem as yours. Thank you.

        Best Regards