Forum Discussion

otiliagaino's avatar
otiliagaino
Helper I
2 years ago
Solved

Power Query - Date Parameter Binding to my DirectQuery Mode error Converting from #datetime to Date

My data types in the my slicer field and parameter are the same. So, I can bind them.

 

My Power query call a Table Valued Function using the date Parameter. 

When the Parameter is not bind yet, the visual is updated accordingly (using the suggested value that is in the Parameter).

But, when I bin the slicer date field to the date Parameter, my visual does not load and I receive the below msg:

 

 

I had checked all my config. and they are by the book. I can no figure it out what I am missing!

Can anyone be of any help, plase!

10 Replies

  • Hi Anonymous  one more test I had done, unsucessfull: I changed my Windows region settings to UK as you can see below, but the error is still ON.

     

  • Hi Anonymous  and everyone!!! 

    Today, after researching and finding nothing!!, I started from scratch:

    - Created the parameters,

    - Direct Queried my Table Value Function (using the parameters).

    - Using advanced Editor I changed the fixed values for the recent created Parameters.

    - So far, so good!

    - Then, created the date table using Calendar function and BIND to the Date Parameter

    - Without creating the Slicer, I could grab the date field from my direct Query and put in the visual

     

    - But, straight after I create the slicer, I got the error:

     

    - Maybe there is something wrong in my SQL command!!

       ---> The very first Advanced Editor (before change to the parameter name) stated this:

              The system created the above query using the information I provided when getting SQL data in Direct Query Mode:

     

    - Following all the instructions on the https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-dynamic-m-query-parameters    I changed the Advanced Editor to have the following:

    - Kept following Microsoft link and instructions:

      --- I created the Date Table as below and bound to the Parameter

     --- Bound to the parameter

    - Again, so far, so godd!

    - Notice, that I had not created the Slicer yet, and I could grab the date field from my Query and put in the

    visual:

    - But, when I create the Slicer, I got the error:

     

    - I guess, Anonymous , that can something I need to fix in my sql command. Instead of Param_Starting_Date, maybe something to tell the system that the field is already a date!!!

     

    Thanks for Anonymous and any other that can give me the so needed help!!!!