Forum Discussion

thimmaraju's avatar
thimmaraju
Regular Visitor
9 months ago
Solved

pass the slicers/parameter values into sql query (BIG QUERY GCP)

Need help on this requirement. URGENT.   I have to pass the selected slicer values like year and months as SelectedYear and SelectedMonth parameters values into BIG QUERY db sql query. tried with...
  • Anonymous's avatar
    Anonymous
    9 months ago

    Hi thimmaraju ,

     

    Currently, the behavior you’re seeking isn’t supported with the BigQuery connector. Power BI does not allow slicer selections to be incorporated directly into custom SQL statements for BigQuery, nor does it support dynamic M query parameters with this connector. As a result, examples that apply to KQL or other Azure-based sources are not applicable in this scenario.

    With BigQuery, the recommended approach is to load data as usual and let Power BI manage filtering. If you utilize DirectQuery, selections made in the report, such as Year or Month, are automatically reflected in the SQL queries that Power BI sends to BigQuery, providing the intended filtering effect without manual parameter integration. In Import mode, however, slicers do not affect the SQL at refresh because parameters are not updated dynamically.

    While this may seem restrictive if you wish to directly control the SQL, it reflects the current capabilities of the connector. At present, BigQuery does not allow binding slicer values into native queries using dynamic M parameters, so using DirectQuery and allowing Power BI to handle filter folding is the most effective solution.

    Thank you.