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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
arpost
Post Prodigy
Post Prodigy

Is it possible to dynamically group data based on slicer interactions?

I have a scenario where I need to dynamically display the currently selected item compared to all other items in the data. This is similar to dynamic grouping/binning but is based on a text selection rather than some kind of number.

 

For example, if a user selects a state in a slicer, I want it to dynamically show the GA numbers compared to all other states. If a user then chooses TN, it would show TN compared to all other states.

arpost_1-1635877267320.png

I've seen various posts online about dynamic grouping/banding with numbers but haven't figured out how to achieve this with text. Anyone have any ideas?

5 REPLIES 5
Jihwan_Kim
Super User
Super User

Picture1.png

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

That's definitely closer, @Jihwan_Kim, but I'm finding that does not translate to my scenario as I can't get it to work. I just blanks unless I select the Other value. I apparently can't attach files here, but here's what would be closer to my scenario with your setup.

 

Here's a sample of the data:

 

arpost_0-1635893534848.png

 

I'd like a user to be able to select a client and see how that client's numbers compare to all other clients excluding that one.

Hi,

Thank you for your message.

Do you want to create a Client-Slicer? Or, a State-Slicer?

The below is for creating a client-slicer.

 

Picture1.png

 

AXIS Client new table = //this new table is used in the visualization, not in the slicer
UNION ( VALUES ( Data[Client] ), ROW ( "Client", "Others" ) )
UNION ( VALUES ( Data[Client] ), ROW ( "Client", "Others" ) )
 
Sales total: =
SWITCH (
TRUE (),
SELECTEDVALUE ( 'Slicer Client new table'[Client] ) = "Others", CALCULATE ( SUM ( Data[Sales] ), REMOVEFILTERS () ) - SUM ( Data[Sales] ),
SELECTEDVALUE ( 'Slicer Client new table'[Client] ) IN VALUES ( Data[Client] ),
CALCULATE (
SUM ( Data[Sales] ),
FILTER (
Data,
Data[Client] = SELECTEDVALUE ( 'Slicer Client new table'[Client] )
)
),
BLANK ()
)
 
 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
MFelix
Super User
Super User

Hi @arpost,

 

You need to o have a disconnected table with the states then you need to add two measures

 

Selected state = CALCULATE (SUM(Table[column]), table[STATE] = SELECTEDVALUE(UNRELATEDTABLE[STATE]))

 

OTHERS = SUM(Table[column]) - [selected state]

 

Now used this two measures on your chart. 

 

Should work has expected,but be aware that this may need some changes if you have other filters or slicers on your report. 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Thanks for the reply, @MFelix! The issue I'm facing is certain visuals don't support the use of multiple measures in the Values field, so I need some kind of Legend value. 😞

 

For example, the Box and Whisker visual from MAQ only allows a single Value field.

arpost_0-1635879275555.png

Do you know of a way to achieve the same result you mentioned but with a Legend-appropriate value?

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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