Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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?
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
80 | |
60 | |
35 | |
35 |
User | Count |
---|---|
100 | |
62 | |
56 | |
47 | |
41 |