Forum Discussion
swrlabhe
1 year agoHelper I
Dynamic M query with snowflake
Hi All i am trying to setup a dynamic M query parameter with snowflake and date field. i have created the parameter in report and trying pinning in the query but somehow it always shows syntax erro...
- 1 year ago
Hi @
Try something like below:let AsOfDateParam = AsOfDate, FormattedDate = Date.ToText(AsOfDateParam, "yyyy-MM-dd"), Source = Sql.Database( "YourServerName", "YourDatabaseName", [ Query = " SELECT OrderID, CustomerID, OrderDate, TotalAmount FROM Sales WHERE OrderDate >= '" & FormattedDate & "'" ] ) in Source