Power BI change data source parameter - powerbi

Is it possible and how change data source parameter value with slicer or check box click in power bi without manual edit and then refresh data.

No, it isn't possible. However, you can make a report which connects and reads all the data sources, and use a What-if parameter with slicer to calculate result based on one of the data sources only (depending on the what-if parameter's value).

Related

Can I programatically pass a parameter value to a PowerBI report?

I have an embedded PowerBI report that needs to execute a query with a parameter that changes depending on which client opens a report. I need to programatically pass the value of a parameter (that cannot be prepopulated inside a filter) so that I can then use this value to execute the SQL query.
Also this parameter should not be visible/modifiable to the reader of the report because they would be able to change the value and see data they were not supposed to see.
I tried passing a value programatically to a filter but the filter needs to contain the value in order to set the value being passed.
You can do this with a Paginated Report using a Hidden Parameter, but not a Power BI Interactive Report. See In SSRS, how does an "Internal" parameter differ from a "hidden" parameter?

Can I make PowerBI report re-pull data from the data source when the value of the slicer changes? (they way SSRS parameters work)

I am new to PowerBI and have one report, which I would like to work similarly to the SSRS. When the value of the slicer changes, I would like to re-pull data from my data source for further analysis. Is this possible?
Yes. It is called DirectQuery. Here is a list of data sources, which supports DirectQuery mode.

PowerBI slicer value passing to query

I have a report generated from a SQL query, having a due date column. My requirement is to create a slicer and  whatever the date a user selects in the slicer the report should show all the data where due date is less than the selected slicer date.
I am not able to pass the slicer date to my SQL query. 
Can you guide me guys in finding the best possible way?
This is not possible in general. Slicers and filters set on a report page cannot modify the model (e.g. calculated tables or calculated columns) and cannot modify the queries.
The only possible way to do this sort of thing is with a DirectQuery, which does it automatically in the background since it dynamically queries only the needed data. Otherwise, you need to pre-load all of the data that you intend to use in the report.
Using DirectQuery has significant limitations and may or may not work for your use case. Please check the limitations and considerations in the linked documentation for details.

How do you create a parameter list drop down in Power BI?

I have always been able to create drop-down list parameters within SSRS that allow the user to dynamically filter their reports based on one or more values selected from the drop-down list box of multiple values.
Translating now over to Power BI I cannot find any documentation to achieve the same functionality.
I've found a method of turning the slicer into a drop down list box. But it only allows for the selection of 1 value at a time. So it essentially seems to me to be more of a drop-down list of radio buttons.
In SSRS I could create a stored procedure that accepted a value and returned a record set filtered on a specific value(s).
I can see how to do this with Power BI as well but the method I've seen demonstrated, forces the user to select a value before the report is loaded and subsequently loads a pre-rendered report template. Which isn't the same.
So how does one go about creating a report that implements a true drop-down list box allowing for selection of 1 or more values to dynamically generate the result in the report?
Reference links are welcome if a simple answer isn't possible.
This is an out-of-the-box feature in PowerBI
Create a slicer visual and, as you've already discovered, set it to Dropdown type using the upside down carrot icon on the slicer header. The dropdown list is multi-select by default. Hold down [ctrl] while making the multiple selections. However, you can control Multi-Select behavior under the 'paintbrush.' When the visual is active, click the paintbrush icon under visualizations, expand 'Selection Controls' and you will see several options to manage your slicer's behaviors.
Additionally, you may want to explore the new filter experience, which is still in beta. https://learn.microsoft.com/en-us/power-bi/power-bi-report-filter-preview
Otherwise, The behavior in SSRS where the report loads from data sources using parameters chosen by users either as parameters in stored procedures or incorporated into dynamic SQL is not replicated in PowerBI. It's true that there are parameters that can be incorporated in that way with the data set refresh - but these are controlled on the data set, not the report, and are not convenient (or appropriate, really) for report viewers to manipulate.

Power BI - how to get reports on Power BI web on the basis of parameters

I am new to Power BI, doing some work.
I have millions of records in SQL Server database, what i want to achieve is..
whenever my colleagues open the report on Power BI, it must ask for the date parameter.
Once the date is submitted, then it must go to the SQL Server and fetch the data and then it must display the report.
Is it possible?
If it is, could some one please show me how to achieve it?
If you define a parameter in your report and use it for filtering data, when you load the report, the data matching the filter will be loaded. You can provide a default value, that you know will return no data (e.g. date in the future, if you are showing the data on or after some date).
You can declare a parameter (in your case of date data type) and use it to filter the data. To declare it, open your report in Power BI Desktop, go to Power Query Editor (by clicking on Edit Queries button in the ribbon) and define a new parameter in Manage Parameters dialog:
Make sure the data type of the parameter matches the type of your data, i.e. if your data has time, define Date/Time parameter. If your data is Date, define Date data type parameter.
Then go to your query, which you want to filter and click on the button in the header of the column you which to filter. In Date/Time filters menu choose how to filter the data, e.g. to fetch the data that is on or after some date:
Then you can close Power Query Editor and return to the report. You can change the parameter's value from the drop down under Edit Queries - Edit Parameters.
If you want to avoid loading data for the default value of the parameter, you can save this report as template (File -> Export -> Power BI template), and then send this template to your colleagues. When they open it, they will be prompted to enter values for the defined parameters, and only after that, the report will connect to the data source and fetch the matching data. This means that first, you didn't use Power BI Online, but shared the report as a file, and second your colleagues has access to the data source to be able to load the data.
If you must publish the report to Power BI Online, then you can use completely different technique - instead of defining a parameter, pass the filter in the report's URL. When the report is loaded normally (e.g. you go to the workspace and open the report), it will show all the data (it will not be filtered). However, you can prepare a special URL for your colleagues, by appending ?filter=MyTable/DateColumn ge 2019-02-04 to the report's URL that you see in the browser's address bar. Replace MyTable with the name of the table you want to filter (e.g. SalesData) and DateColumn with the name of the field on which you want to filter (e.g. SalesDate). If there are spaces in these names, you must replace them with _0x0020_, but if possible, just avoid them. After that the filter defines an operator for filtering, e.g. ge means greater than or equals. And at the end is the value (the date in your case).
You can make a web page, where the user can select a date, and this page will generate the appropriate URL for your report. Or you can make another report, where the URL is constructed as a computed column or a measure based on some conditions (e.g. selecting a date from a slicer) and the user can click on the hyperlink, which will load the actual report, but filtered.