Forum Discussion

BugmanJ's avatar
BugmanJ
Helper V
3 years ago

Parameter Not Binding in DirectM

Hello,

Using query:

 

 

let

filterquery = "SELECT [RECORD_MODIFIED],[CUSTOMER]FROM [SHOP].[CAKE] where [SHOP].[CAKE].[RECORD_MODIFIED]

> CAST('"&DateTime.ToText(StartD,"yyyy-MM-dd hh:mm:ss")&"' as DateTime)",

Source = Sql.Database("Server", "Datebase", 
    
[Query=filterquery])
in
Source

 

 

StartD = 25/11/2022 00:00:01

This works okay

However, if i introduce a table like this:

 

Starting
01/12/2022 00:00:00
02/12/2022 00:00:00
03/12/2022 00:00:00
04/12/2022 00:00:00
05/12/2022 00:00:00

 


And Bind this to the Parameter, it does not change the query. Why? What needs to be corrected?

Thank you

2 Replies

  • ppm1's avatar
    ppm1
    Solution Sage

    I did same on my end and confirmed it worked as expected. Did you set your new Staring column to DateTime type?

     

    Pat

     

    • BugmanJ's avatar
      BugmanJ
      Helper V

      Hello,

      Yes everything is set correctly but still not binding to Query