Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. 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 | |
75 | |
60 | |
37 | |
33 |
User | Count |
---|---|
102 | |
56 | |
52 | |
46 | |
40 |