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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Dynamic Grouping of [slicer selection] and [all other values] in a pie chart

Hello PowerBI friends -- I'm reaching out in need of help as I'm struggling to achieve this very simple (in principle) task:

 

I have a table of Clients, and their respective revenues (in addition to other data such as month etc). For the sake of simplicity, let's assume that it's a table with 2 columns like so:

 

[Client Name] , [Revenue]

 

I have a slicer on the Client Name field, where I select the desired client and all visuals on my report get automatically filtered to display information relevant ONLY to the client selected.

 

I want to add a simple pie chart that will show the percentage of the selected client's revenue over the TOTAL revenue; i.e. how much (%) did the selected client contribute to the total revenue figure.

 

Essentially I'm looking to have 2 categories in my pie chart: one is the selected client as defined in my slicer, the other would be all other clients grouped together. I want this to obviously change depending on my slicer selection

 

Example:

[Client Name]     [Revenue]
ClientA             20.3
ClientB              7.4
ClientC             17.3

If I select ClientB in my slicer, I want my pie chart to show: Client A: 16.4%, Others: 83.6%

 

That is all! And I've been playing with creating new measures using all sorts of DAX functions like calculate(), all(), allselected(), allexcept() but I can't seem to find a way to do that.

 

Hopefully somebody can help -- would be very much appreciated!

 

Thank you in advance

-e.

1 ACCEPTED SOLUTION

I made a mistake with my earlier post. I've gone back and corrected the measure there.  Here's the graph I was able to make:

  snip.PNG

 

If there are other filters you want to respect for the whole graph while still splitting into "current selection" vs "other", use ALLEXCEPT and list the columns you want to respect.  For example, if you wanted to show International vs Domestic clients.

View solution in original post

3 REPLIES 3
Cmcmahan
Resident Rockstar
Resident Rockstar

Sure.  What you want is a measure.  It should look something like this:

 

Other Revenue = CALCULATE(SUM('ClientData'[Revenue]),ALL(ClientData))-SUM('ClientData'[Revenue])

This value will be dynamic based on current filter selections.

I made a mistake with my earlier post. I've gone back and corrected the measure there.  Here's the graph I was able to make:

  snip.PNG

 

If there are other filters you want to respect for the whole graph while still splitting into "current selection" vs "other", use ALLEXCEPT and list the columns you want to respect.  For example, if you wanted to show International vs Domestic clients.

Anonymous
Not applicable

Thank you so much! Lot to learn still!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.