Forum Discussion
Dynamic M query parameter binding to a query table which uses import mode
- 5 months ago
Hi Sanjota07 ,
Non-null assertion failure: resource: Resource should be available for query Query2 to store FoldedArtifacts in cache This corresponds to that the pbi engine cant fold the entire query in direct query mode so this flag is raised
You can also try this approach :
let
Source = Sql.Database("",""),
PrCase = Source{[Schema = "dbo", Item = "Table"]}[Data],
FilteredRows = Table.SelectRows(PrCase, each [Active] = #"Active")
in
FilteredRows
Thanks
Hi Sanjota05 ,
As long as you follow the parameter binding rules, you should be able to use the direct query successfully.
Please create a blank PBIX file, add the table, and check it.
I hope your model doesn’t have any RLS applied.
https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-dynamic-m-query-parameters
Thanks
- Sanjota055 months agoFrequent Visitor
Hello Natarajan_M
I have loaded the table in blank PBIX file and this time I just used only one parameter
Sqltext="Select * from orders where orderID =@porderID
Still import mode was choosen. Not sure what is the issue.
Thank you so much for your valuable assistance Natarajan_M