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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
eyeball
Frequent Visitor

Calculate perentage by Type

Hi,

 

I have a table that contains funds that have a group name and a value.  I'm trying to calculate what each funds percentage is of it's group.  So, the table would look like this:

 

Code   Pool   Value

A         1         10.00

B         1         20.00

C         1         30.00

D         2         50.00

E          2         60.00

F          1         10.00

 

So, for each pool I want to have the percentage value for each code so that I can dispaly it in a donut chart.

 

Any help would be greatly appreciated!

Thanks.

1 ACCEPTED SOLUTION
Sean
Community Champion
Community Champion

@eyeball

 

Here's the Measure that will do this

Measure = 
DIVIDE (
    SUM ( 'Table'[Value] ),
    CALCULATE ( SUM ( 'Table'[Value] ), ALL ( 'Table'[Code] ) ),
    0
)

And the results...

% of Code by Pool.png

Hope this helps! Smiley Happy

View solution in original post

3 REPLIES 3
Sean
Community Champion
Community Champion

@eyeball

 

Here's the Measure that will do this

Measure = 
DIVIDE (
    SUM ( 'Table'[Value] ),
    CALCULATE ( SUM ( 'Table'[Value] ), ALL ( 'Table'[Code] ) ),
    0
)

And the results...

% of Code by Pool.png

Hope this helps! Smiley Happy

eyeball
Frequent Visitor

Hi @Sean

 

That looks really good, thanks!  Could I ask you a quick question re donut charts?  I have a stacked column chart showing all the pools summing the value of each code (which is a pretty standard chart).  I'd like to have a donut chart next to it that when someone clicks on one of the columns in the chart, shows the breakdown of each code for that pool (hence the question re the calculation).

 

When I create a donut chart it seems to be showing every column in the chart rather than just the one I click on.  Is that possible or do donut chatrs not work that way?

 

Thanks!

Hi @eyeball,

Of course, you can create relationship between the donut charts and stacked column chart, so they can be affected with each other. Please review this case.

Best Regards,
Angelia

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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