Forum Discussion
Dynamically change query parameter
- 9 years ago
keithpoplar There is Power BI REST APIs that you can use to automate certain tasks. Documentation for that is here and listed operations. I don't see anything for query parameters.
There is Power BI Embedded which is Azure service. There are several REST operations available for that and can check them out here. Again no operation for query parameters I can see.
Query parameters are currently only supported in power bi desktop and not in power bi service and that is why you don't see operations for them via APIs as well.
Is this still true? Correct me if I'm wrong but I can't use query parameters with Power BI embedded?
Thanks,
Enes
I am on exactly same journey trying to figure out how to make reports without data parameters. Can't really comprehend how to run SQL statements without parameters. One guy here recommended to get all the data into the report and then use a slicer. Forgot to tell him that I am querying Historiians with millions of records and even more.
- keithpoplar9 years agoFrequent Visitor
My Power bi report is also loading data from millions of records. And I figured out I don't really need report parameters like SSRS.
Here is how I approach the problem.
- Use direct query mode in your report.
- Create a view or function in your SQL database to load all data, without any where condition.
- In Power BI desktop, create some dimension tables based on how you want to filter the data and build the relationship with your data table.
- Now you have two options to interactively change the report filter
- Use data slicer to select your dimension table, your data table will be filtered
- Use Power BI Javascript library to build custom filter controls on web pages. (This is my option as I need to use date time range picker)
- Markzolotoy9 years agoImpactful Individual
Data for a report is relevant to a user that runs the report. In your scenario where a user id can be applied? Is it on the SQL Server where data is selected?
- Sunkari9 years agoResponsive Resident
ankitpatira: is this feature available for Power BI Service? I think, this is a nice feature if it is included in Power BI Service.
- athhar5 years agoFrequent Visitor
Depends on the number of data points. If it is millions then better to query while loading rather than filtering after. There is a post from Microsoft but somehow I can't make it work. https://docs.microsoft.com/en-us/power-bi/paginated-reports/report-builder-url-pass-parameters
- SAG19 years agoHelper I
Markzolotoy were you able to find solution for this , please share if you have any info , I am pretty new to power bi and in same delima how can i enable user to change parameters give its huge database can not load all and everything .