Forum Discussion
Dynamic grouping based on slider selections
Here's what I'm trying to do and caveat, I'm super new to power bi so hopefully this is really easy and I just don't know what I'm doing.
I want to have a number of slicers with the same selections in each. These selections would impact the grouping of my matrix.
So for instance I have this data set. I would have 3 slicers and each would have the values None, State, County and City.
| State | County | City | Poplation |
| Georgia | DeKalb | Tucker | 100 |
| Illinois | DeKalb | Malta | 200 |
| Georgia | Fulton | Atlanta | 300 |
| Florida | Manatee | Bradenton | 250 |
| Georgia | Dekalb | Doraville | 50 |
If I make these slicer selections this is what I would expect the resulting matrix to look like.
First Slicer - state, Second slicer - none, Third slicer - none
Resulting matrix -
Georgia 450
Illinois 200
Florida 250
First Slicer - state, second - county, third - none
Resulting matrix -
Georgia, Dekalb 150
Georgia, Fulton 300
Illinois, Dekalb 200
Florida, Manatee 250
first slicer - county, second - none, third none
Resulting matrix -
Dekalb 350
Fulton 200
Manatee 250
And so on for every possible combination of selections.
So what I think I'm asking is is there a way to dynamically group and regroup a matrix based on the selections made in slicers?
Thanks,
Tom
Here's what I ended up doing. He's using a graph but it works in a table.
https://www.youtube.com/watch?v=lFd2hjkKz_Q&feature=emb_rel_end
2 Replies
- v-deddai1-msftCommunity Support
Hi tomgramling ,
We can't add/remove columns with a slicer for table visual. As a workaround, we can combine bookmark and button for your requirement. Please follow the steps below:
1.Create the visuals for each potential selection.
2.Create a Bookmark for each potential selection, making the selection visible and the rest invisible .Overlay these visualizations to show only the current selection and hide the other selection.
3.Create a Button for each potential selection, to "call" the bookmark which makes the relevant visual appear.
You can also refer to :https://blog.crossjoin.co.uk/2018/04/20/dynamically-changing-a-chart-axis-in-power-bi-using-bookmarks-and-buttons/ for details.
After you publish it to power bi service,it will work.
Please refer to the pbix file: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/ETNJcMK9VxhPq27AbWqmmCEBxkT6l75jmrMPXRFSuYCTOQ?e=Tr35rK
Best Regards,
Dedmon Dai
- tomgramlingRegular Visitor
Here's what I ended up doing. He's using a graph but it works in a table.
https://www.youtube.com/watch?v=lFd2hjkKz_Q&feature=emb_rel_end