Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
tomgramling
Regular Visitor

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.

 

StateCountyCity Poplation
GeorgiaDeKalbTucker100
IllinoisDeKalb Malta200
GeorgiaFultonAtlanta300
FloridaManateeBradenton250
GeorgiaDekalbDoraville50

 

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

 

1 ACCEPTED SOLUTION
tomgramling
Regular 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

View solution in original post

2 REPLIES 2
tomgramling
Regular 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

v-deddai1-msft
Community Support
Community 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.

 

Untitled picture.png

 

3.Create a Button for each potential selection, to "call" the bookmark which makes the relevant visual appear.

 

Untitled picture1.png

 

You can also refer to :https://blog.crossjoin.co.uk/2018/04/20/dynamically-changing-a-chart-axis-in-power-bi-using-bookmark... for details.

 

After you publish it to power bi service,it will work.

 

Untitled picture2.pngUntitled picture3.png

 

 

Please refer to the pbix file: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/ETNJcMK9VxhPq27AbW...

 

 

Best Regards,

Dedmon Dai

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.