How does country gets replaced with the parameter and also this causes a replacement in the data set will that be an issue .
also can we use the parameter directly in a query?
Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
Could someone please share some knowledge on query parameters inPower BI.
https://powerbi.microsoft.com/en-us/blog/deep-dive-into-query-parameters-and-power-bi-templates/
I have been refering to the given example in the above link yet unable to understand query parameters concept properly.
Deep Dive into Query Parameters and Power BI Templates | Microsoft Power BI Blog | Microsoft Power BI
Thanks,
Rashmita Reddy.
Solved! Go to Solution.
Hi @RashmitaR,
You can image that the query parameter is a bridge. Users can check different values for the parameter, then other object accept this value and perform a set of operation which has been configured with query parameter. If you are familiar with T-SQL or SQL Server Reporting services, it's easy to understand how it works.
In addition to @ankitpatira's comment, you need to note some settings in the sample report. You can see there is a query parameter named Country. And the author uses this parameter to filter the Country field.
As the parameter has a list of values, we can check prefer value when open the report, then the value is passed behind the scene to filter Country field. I wonder you can know how query parameter works in this scenario now.
Certainly, we can use query parameter in another ways. You can take a look at those articles to learn more:
Creating M Functions From Parameterised Queries In Power BI
Power BI Desktop Query Parameters, Part 1
Power BI Desktop Query Parameters, Part2 – Dynamic Data Masking and Query Parameters
If you have any question, please feel free to ask.
Best Regards,
Qiuyun Yu
Hi @RashmitaR,
You can image that the query parameter is a bridge. Users can check different values for the parameter, then other object accept this value and perform a set of operation which has been configured with query parameter. If you are familiar with T-SQL or SQL Server Reporting services, it's easy to understand how it works.
In addition to @ankitpatira's comment, you need to note some settings in the sample report. You can see there is a query parameter named Country. And the author uses this parameter to filter the Country field.
As the parameter has a list of values, we can check prefer value when open the report, then the value is passed behind the scene to filter Country field. I wonder you can know how query parameter works in this scenario now.
Certainly, we can use query parameter in another ways. You can take a look at those articles to learn more:
Creating M Functions From Parameterised Queries In Power BI
Power BI Desktop Query Parameters, Part 1
Power BI Desktop Query Parameters, Part2 – Dynamic Data Masking and Query Parameters
If you have any question, please feel free to ask.
Best Regards,
Qiuyun Yu
Hi @RashmitaR,
Perhaps you can understand query parameter now, right? If that is a case, would you please mark helpful replies as answers for us to close the thread?
Best Regards,
Qiuyun Yu
How exactly a parameterized report is going to work when we run it on Mobile Power BI? IS it going to prompt for the parameter?
@RashmitaR Query parameters are new feature that can be used for multiple purposes. Like it is shown in this demo you can use parameters to replace values in text with parameters values using DAX. Suppose you have created report (pbix) for differenct countries and title for your report says 'This report is for country: CountryName'. Then using query parameters, when your users open pbix file they are prompted for parameter value and if using DAX you've assigned that parameter value to CountryName then in report it will be replaced by text user has entered for that parameter.
Other uses of parameters are for making data sources dynamic such as if you have multiple instances of sql server databases rather than creating different pbix for each instance you can create pbit (template file) along with query parameters for data source that when opened will prompt for sql server name and instance name and can connect to it.
I have actually submitted a blog post on how to do that (its not published yet but keep an eye on Community Blog section and it will be published in next few weeks).
So in short it depends on your requirement. If you have a need to replacing certain text with parameters you can use query parameters (like shown on this blog), if need is to make data sources dynamic you can use query parameters and as that feature evolves there will be more use of it.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |