Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello,
I need to create a dashboard to let the users select a Report Date, and pass the date to a direct query to SQL Server.
I am looking for how to create and select a date as a parameter for a direct query. Hope to get help here.
What I have done below may not be in correct direction.
I created a "Report Date" query that contains last 90 days. I also created a ReportDateParameter that used the "Report Date" query.
I created a direct query "where ld.ReportDate = '", each Date.ToText([ReportDateParameter],"MM/dd/yyyy"), "'". That has
Expression.Error: We cannot convert a value of type Function to type Text.
Details:
Value=[Function]
Thanks.
Type=[Type]
Thanks JaromG,
I changed it to "where ld.ReportDate = '" & Text.From([ReportDateParameter],"MM/dd/yyyy") & "'".
Now I received another error
Expression.Error: There is an unknown identifier. Did you use the [field] shorthand for a _[field] outside of an 'each' expression?