Forum Discussion
Dynamically set slicer using selected table row
Is it possible to dynamically set a slicer, based on a given field in a table row, when a row is selected?
I work for a commercial lender and we've built a multi-page Power BI report evaluating several aspects of our borrower relationships, as defined at a MasterAccount level. All tabs are primarily driven off of a single slicer on MasterAccount. This works perfectly mechanically, but in practice we have three difficulties finding the right one: a) there are thousands of accounts, b) many really are distinct but sound similar, and c) we often need to search by individual without knowing what MasterAccount they roll up to.
MainSlicer
To facilitate searching for the correct MasterAccount, we built a table (searchable via Text Filter) listing all active individuals & companies, the capacity in which we work with them, the MasterAccount they're associated with, and the value of the relationship at that MasterAccount level. Therefore, the same MasterAccount can appear multiple times (in red), with the most probable hits at the top.
This requires a 2-step process. Ideally, I'd like to be able to click on an entry in the table and have it populate the slicer for the selected MasterAccount. (For the record I do NOT want to use the whole row and filter for the individual/company too, as several entries can roll up to the MasterAccount).
I'm relatively new to Power BI and don't know how to do this without access to VBA. I searched and couldn't find other threads on this.
Thanks for your assistance!
6 Replies
- MFelixSuper User
Hi kpk122 ,
First of all you need to understand that slicers are using for filtering data meaning that the interactions with the rest of the visualizations is different from the other visuals. Since slicer are used for filtering data when you select one value in the slicer the data in the other visuals is change accordingly ro your selection however the interaction from other visuals to slicer is not done except if you use another slicer.
So if you have a table visual and you select a value all visuals are filter by that value except the slicers if on other hand you select a value on a slicer other visuals including slicers will be filter.
On you case believe that the best option is to use the Hierarchy Slicer making the use of both the columns Full Name and account also make sure you activate the search option
https://appsource.microsoft.com/en-us/product/power-bi-visuals/WA104380820?tab=Overview
I'm assuming that you want to select the user but also the account didn't understood if you also want to have only the selection of the main account for all users.
Regards,
MFelix
- kpk122Frequent VisitorThanks for the response MFelix. I do want only the MainAccount to act as the slicer / field used to filter reportS. For example, if Person A and Person B both work for XYZ Corp, If I search for Person A I want it to show that they work for XYZ Corp in the lookup table, and if I select the line with Person A I want the reports to be oriented around all of XYZ Corp.
Thanks again!- v-lili6-msftCommunity Support
HI kpk122
I'm a little confused about your description, could you please use some simple dummy data show your expected output.
Regards,
Lin