Forum Discussion
shivakumardr1
2 years agoFrequent Visitor
M Query parameter binding in Power BI
Hello, I have created a power BI report in Direct query mode against a Data bricks SQL warehouse source. I need to make use of M query parameters for optimal data rendering and was hoping to bind th...
shivakumardr1
2 years agoFrequent Visitor
Thank you danextian for your response. The parameter is bound to a field that is available in the model and the same field is used in the slicer. Not sure, what is being missed here. Please let me know if there is something else I need to be checking as well.
danextian
2 years agoSuper User
As mentioned, slicer selections cannot be passed back to the query editor. They stay in the semantic model and are meant to be used for data modelling. Your alternatives are:
- Use a multi-selection parameter. You can follow this route if you intend to give the pbix to users and they have access to the underlying data source. The parameter can also be edited in the service but whoever edits must be the owner of the semantic which ownership can be achieved by taking it over and granting he/she has access to the data source.
- Add all category values to the model. In your case (based on M parameter code provided), all site ids must be added to the model so users can select the ones they're interested in via a slicer. If the storage mode is via DQ, I don't see a reason why the need for a parameter to filter the site id. If loading everything affects performance, I would suggest to pre-select just a site id either from the slicer or the filter pane and add the apply slicer button.