cancel
Showing results for
Did you mean:
Regular Visitor

## 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

Accepted Solutions
Highlighted
Anonymous
Not applicable

## Re: Calculate share of individual subcategory to one specific total category

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")`

2 REPLIES 2
Highlighted
Anonymous
Not applicable

## Re: Calculate share of individual subcategory to one specific total category

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")`

Regular Visitor

## Re: Calculate share of individual subcategory to one specific total category

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!