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

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.

Related

Were you aware of this behavior ? (PBI filterpane over slicer visual, sellect all/none selected issue)

Hello I am trying to raise awareness about his subject I am facing this issue, I've posted on microsoft PBI community as wel, Did you even know about this, if so, how did you do to workaround this?
https://community.powerbi.com/t5/Desktop/Beware-Misleading-behaviour-using-Select-all-or-none-selected/m-p/1982650#M749494
As stated in the post, I have just found half a paragraph hinting about this behaviour and all the people that I've talked to did not even know it behaved this way.
TL:DR. If you use the filter panel to filer a slicer (filter on this visual) in order to restrict the selection of a slicer (so your end user does not get lost in too many options or you want a dynamic slicer showing last x months, TOP N , basically any other advanced filtering optins given using this feature).
It only visually filters the slicer so if the user ends up using "select all" or even clearing the selection, all the data would be selected even the data you (as designer) wanted to filter out. Which is misleading since the end user would see the tag "all" over the slicer selection but when clicking on it it would only show the filtered out values, so they would naturally assume that "all" means just those values and not allvalues (hidden values included).
Example
there are only two values to be selected in the slicer but the select all option actally seelcts all values including hidden ones
One thing to check first, I bet you did not apply the filtered values in the filter pane on the whole page, rather you applied it only on the visual. Try to apply that on the whole page and it seems to work for me.

Power BI Selected Visuals BookMark

1.I have a bookmark built on selected visuals.
How to identify the selections used to create that bookmarK
Bookmarks only make certain selections in/visible so you can go through them and observe which one change their nature.
If you have only one, create one with full visibility to see which ones are being adjusted.
It's far from neat, like a list that you are probably looking for, but I'm not aware of any such option in PowerBI

How deselect a radio button on select of another in power bi?

I have used chiclet slicer to achieve radio button,
In my case from 3 measures I have taken 3 chiclet slicers, While clicking on a single radio button it is working fine, but on selecting another how to deselect the other two radio buttons.
I have data in 3 different measures "daily", "weekly" and "monthly".
My requirement is on the select of any those rest two options should be deselected, which is the default behavior of the radio button.
Or you can suggest me if there is any other way to implement the radio button.
I've always achieved this using the standard slicer and a hidden table with the needed labels and/or values.
Create a table by using "Enter data" or by using DAX, and put in it your 3 labels "Daily","Weekly","Monthly", I will call the table "MyTable" and the column "SwitchLabel"
Create a slicer with field "SwitchLabel", in the selection control enable "single select". (you can change the orientation in the "general" section).
Create a switch measure like the one below:
SalesSwitch = SWITCH( SELECTEDVALUE('MyTable'[SwitchLabel])
,"Weekly", [WeeklySalesmeasure]
,"Daily", [DailySalesmeasure]
,[DefaultMeasure] --optional "else", if nothing matches or there are multiple selections
)
Put the "SalesSwitch" measure in the charts.
The slicer/filter on the "switch" table must be present on every page that uses the measures, otherwise (without filter), it will always fall in the default case.
One limit of this solution is that it cannot change the X axis, in fact you are just calling different measures based on the selection.
If you need to also change the X-axis use Seymour's method with buttons and bookmarks.
There are many ways to implement the same need.
Buttons + Bookmark (built-in)
Slicer + Switch (built-in)
custom visuals in the store
In general, I prefer built-in Power BI functionalities because for enterprise production solution you do not want to rely on custom tools not officially supported by the software vendor.
Therefore, if your project is a real work then my suggestion is to use the Buttons + Bookmark built-in functionality. For your case you need:
Buttons
Bookmarks
In practice, create 3 buttons: Daily, Weekly and Monthly.
Next, create a bookmark with the default view, calling it Default.
Then, update one bookmark for each of the three view. It could simply be hiding or showing a visualization in the same page. Please note that a hidden visualization will not trigger any computation when the page is opened.
Finally, set the action of clicking the button to direct the user toward the bookmark.

Show/Hide column in Power BI Table/Matrix visual

Is there any possibility to show or hide the column in Table/Matrix visual in Power BI report by user dynamically?
For Example, I have a table view with columns COLUMN-1, COLUMN-2, COLUMN-3. Now I may have filter drop down to list all the column headers, so based on user selection (Multiple selections) Table view should get adjusted to show column values.
Since Power BI was developed based on Excel, curious to know if we are having Hide/Show column based on any condition or available in visual by default (Maybe by right-clicking on column header then show/hide it).
You can do this with the following workaround:
Create your page with the table showing both columns.
Create a bookmark, uncheck "Data"
Duplicate the page and remove the column you want to conditionally hide. Set the page as hidden.
Create a bookmark, uncheck "Data"
Add a button to the first page pointing to the 2nd bookmark
Add a button to the second page pointing to the 1st bookmark
Ensure your slicers are synced
The end user experience is they will feel like they are conditionally hiding and unhiding the column.
A bit crap and a lot of extra work but I have it working well in my implementation.
Currently it is not possible to hide columns in visual based on slicer selection, there is an idea about this issue, please vote it up.
https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/19435267-conditional-visibility-of-a-visual-based-on-slicer
Thanks!
This is now available in Power BI with preview feature "Field Parameter". Check the May 2022 update.

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.