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
Anonymous
Not applicable

Calculate share of individual subcategory to one specific total category

I apologize if a similar question has been asked before. My search attempts were unsuccesful and I would greatly appreciate your help on the following issue.

Let's assume the following

Level 1

level 2

Level 3

Costs_value

Total income

Total

Total

400

Total costs

Total

Total

300

Expenses

Labor costs

Indirect labor costs

80

Expenses

Labor costs

Direct labor costs

120

Expenses

Depreciation expenses

Intangible assets depreciation

30

Expenses

Depreciation expenses

Tangible assets depreciation

50

Interest

Interest costs

Interest

20

 

I would like to calculate the share of each individual category as share of total income no matter what level you have drilled down. So when completely drilled down, I would like to have a measure added in the matrix which would show the percentage share of indirect labor costs, directl labor costs, etc. of total income.

 

I have tried to create the following measure: Calculate(sum(Costs_value);Level 1 = "Total Income")

This however returns the sum of total income but only to level 1and leaves "blank" values when drilling more down into the hierarchy.

 

I would need a measure which will give back "400" for all levels to be able to calculate the share of each individual category on the lowest level to this.

I would be very thankful if you could provide me with a solution :). Thanks a lot!

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hello,

Try this and tell us if works for you:

 

.Total income = CALCULATE(SUM(Table1[Costs_value]);FILTER(ALL(Table1);SUM(Table1[Costs_value]));Table1[Level 1]="Total income")

TotalIncome.JPG

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hello,

Try this and tell us if works for you:

 

.Total income = CALCULATE(SUM(Table1[Costs_value]);FILTER(ALL(Table1);SUM(Table1[Costs_value]));Table1[Level 1]="Total income")

TotalIncome.JPG

Anonymous
Not applicable

Hi Miltinho,

 

Thanks a lot! That was exactly what I was looking for. I have marked your answer as the solution. I appreciate your help very much!

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.