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
aellison
Helper I
Helper I

Percent of Total with Grouping

I have a calculation that I am having issues with. I want to create a stacked column chart where the total height is the overall groups percentage, but the stacks are a subset of those groups. Here is a mock example of the dataset

IDDepartmentNumDaysScheduledDaysGroup
111PEDIATRIC310-7 Days
222PEDIATRIC 0Open
333PEDIATRIC2018-21 Days
444SURGERY1118-21 Days
555SURGERY151

8-21 Days

 

I want to show the bars in the chart by Department, and the stacks by DaysGroup. The bars respresent a percentage of the Scheduled vs All Rows. They should only use a calculation based on their respective department. As seen below, the example shows 3 tables, the numerators being used, the denominators being used, and the current calculation. The arrows show the various numbers that I am trying to use:

 

Link in case the image is not legible:  Link for Report Example

 

 Capture.PNG

 

 

Any help is greatly appreciated.

 

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

hi @aellison

 

Try with this:

 

 

%Scheduled = [SumScheduled]/CALCULATE([CountId],ALLEXCEPT(Table1,Table1[Department]))




Lima - Peru

View solution in original post

2 REPLIES 2
Vvelarde
Community Champion
Community Champion

hi @aellison

 

Try with this:

 

 

%Scheduled = [SumScheduled]/CALCULATE([CountId],ALLEXCEPT(Table1,Table1[Department]))




Lima - Peru

Thank  you @Vvelarde .. that worked great ... 

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.