Forum Discussion
swrlabhe
Helper I
1 year agoDynamic 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
v-kpoloju-msft
Community Support
1 year agoHi swrlabhe,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
v-kpoloju-msft
Community Support
1 year agoHi swrlabhe,
Hope you had a chance to try out the solution shared earlier. Let us know if anything needs further clarification or if there's an update from your side always here to help.
Thank you.
- v-kpoloju-msft1 year ago
Community Support
Hi swrlabhe,
Just wanted to follow up one last time. If the shared guidance worked for you, that’s wonderful hopefully it also helps others looking for similar answers. If there’s anything else you'd like to explore or clarify, don’t hesitate to reach out.Thank you.