Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi,
I have a direct connection to an SQL Server via my powerbi report. In advanced editor I have the following:
let
Source = Sql.Database("Server\Database", "Database", [Query="Select * from queryinsql(" & Number.ToText(PeriodParameter) & "," & Number.ToText(YearParameter) & ")"])
in
SourceI've 2 parameters I'm passing to the query, period and year. I don't want the users to enter these parameters themselves in the query editor and would like if these parameters were available on the report level.
I followed this link, creating a table for period and another one for year but it seems it doesn't support SQL queries. https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-dynamic-m-query-parameters
Has anyone any advice please?
Thanks.
Solved! Go to Solution.
Hi @JohnLow ,
If you have a sql connection using direct query mode, as the document mentioned the dynamic M query could not suppport in this comection.
The feature is only supported for M based data sources. The following DirectQuery sources are not supported:
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @JohnLow ,
If you have a sql connection using direct query mode, as the document mentioned the dynamic M query could not suppport in this comection.
The feature is only supported for M based data sources. The following DirectQuery sources are not supported:
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@JohnLow , There was feature in OCT 2020- https://powerbi.microsoft.com/en-us/blog/power-bi-october-2020-feature-summary/#_Toc51665421
https://blog.crossjoin.co.uk/2020/12/06/using-power-bi-dynamic-m-parameters-in-dax-queries/
See if that can help
@amitchandak, This all refers to dynamic m parameters though, I have an SQL query?
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 35 | |
| 31 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 75 | |
| 72 | |
| 39 | |
| 35 | |
| 23 |