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

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.

Related

How to use a card as a filter in Power BI?

Is there a way to use a card as a slicer/filter in Power BI?
My report has two cards, "students_eligible" and "students_attended", as well as a table below them. I want to filter the table based on the cards. Meaning, if I click on the “students_eligible” card, then the table should only show the data related to “students_eligible”.
How can I accomplish this?
I’ve included an image below for context.
There is no direct method of using a Card as filter, you can't set it as one or assign a bookmark to an action on it.
What you need to is create for example a shape that sits on top of the visual, turn ofs the fill, background and boarder options, just to leave a transparent shape:
Then create two bookmarks, one with a filter for Students Eligible, and the other for Students Attended. You may have to create a third bookmark assigned to a button or other object to return to 'No filters'.
Assign the bookmark to the shape object and ensure that it is on top of the visual. So when the use no clicks on the card, it will click on the shape, which will then filter the page based on the bookmark.
You can if you wish, just use the Bookmark buttons rather than click on the card object, which may be better from a user point of view
Cards are not clickable by itself.
You can create a bookmark that holds data for the slicer value you want to choose. Also, create a button and add this bookmark to the buttons action property.
Place this button over the card and make the button completely transparent using the background and fill properties.
This provides a user experience of clicking on a card to filter
I recently developed the Slicer Button custom visual that allows one to use a card as a filter (more specifically as a "slicer"). Using a bookmark has some drawbacks and this custom visual allows a card to be used more similarly to a slicer visual.
Below if a YouTube video demonstrating how to setup and use the visual as well as a link to the GitHub repository.
Basic Setup & Use: https://www.youtube.com/watch?v=8x2QoE8M2yA&ab_channel=MattKocak
GitHub Repository: https://github.com/mattkocak/powerbi-visuals-slicerbutton
I'm happy to clarify anything that's unclear regarding the visual. I also have a blog post on the topic titled Turn your cards into slicers with the Slicer Button custom visual.

Is there a "tab control" Control for PowerBi

Is there a Tab Control control in Power Bi that can be dropped onto a dashboard similar to other controls, like checkbox, list, etc. I would like the user to be able to add various inputs on each tab and then be able to plot a line on a chart based on their selections. Each tab on the Tab control would represent a separate product. An image of a tab control can be found at the link below.
Not sure if Power BI has something like that out of the box, but you could roll your own.
It looks like you want a bunch of slicers that are overlapping and come to the top when their "tab" is clicked. You can achieve this by showing/hiding slicers when a button is clicked. Conceptually:
add slicers to the report and arrange to overlap
add buttons to the report and arrange side by side
add bookmarks to the page that show the different hidden/visible states of the slicers
assign the bookmarks to the buttons
Matt Allington has a blog post about this technique. He uses just one slicer panel, so you will need to adjust it to your needs but it has everything you need to do what you describe.

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.

one-way interaction between visualisations

I have a simple (one table) report with the following columns: Date, Amount, Category and Subcategory.
I try to create a page with three visualisations.
The first one is for the amount/date (vertical bar chart). The second one is for amount/categories (treemap). The last one is for amount/subcategories (treemap).
I have created hierarchy for date and categories.
When I select a column in the amount/date, the visualisation of the bottom ones filters OK.
The problem that I have is that when I click on the amount/category treemap the amount/date bar chart resets its selection and the amount/category shows all the categories across all the dates.
I have tried to prevent this by setting the interaction to "No Impact" on the amount/date visual, but it didn't help.
How do I create "One Way" interaction between visuals?
If you CTRL-click, you can make multiple selections. If you click normally, then regular visuals will replace filters on other visuals.
Slicers are a special visual type whose selections don't get overridden by selections in other visuals.

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.