cancel
Showing results for
Did you mean:
Highlighted
Frequent Visitor

## Expense as % of Revenue - Matrix

Hi - I've been struggling with this  for a while.  It seems close to other posts, but I can't quite figure it out.  Please help.

I'm trying to do expense as a % of revenue in a matrix table.  So in this table, I want to divide all expenses and income by the total sales - \$102,924 for February, \$97,633 for January.  I've been able to make it work for the sum of Jan and Feb together, but not by the individual months.  I'd be grateful for the answer!

Table1

1 ACCEPTED SOLUTION

Accepted Solutions
Super User

## Re: Expense as % of Revenue - Matrix

Hi,

This measure works

`Measure 2 = [Total]/CALCULATE([Total],Table1[L1]="Income",ALL(Table1[L2]))`

Hope this helps.

8 REPLIES 8
Super User

## Re: Expense as % of Revenue - Matrix

`Total Sales = CALCULATE( SUM( Table[Revenue] ), Table[L1]= "Income")% of Sales = DIVIDE( SUM( Table[Revenue] ), [Total Sales] )`

Proud to be a Datanaut! Connect with me on Linkedin.
Feel free to email me with any of your BI needs.

Frequent Visitor

## Re: Expense as % of Revenue - Matrix

@parry2k - Unfortunately, that doesn't work.  I need somehow for the \$102,924 to be repeated down the whole column.  Some sort of aggregation.

Super User

Hi,

Frequent Visitor

## Re: Expense as % of Revenue - Matrix

here 'tis

For a quick fix, I "cheated" and used the query editor to aggregate the data, then match it back.  I would like to see a more gracefull solution where I'm not duplicating data!

Thanks,

Rob.

Super User

## Re: Expense as % of Revenue - Matrix

Hi,

This measure works

`Measure 2 = [Total]/CALCULATE([Total],Table1[L1]="Income",ALL(Table1[L2]))`

Hope this helps.

Community Support Team

## Re: Expense as % of Revenue - Matrix

Hi @Rob4848

Is this problem sloved?

If not, please let me know.

Best Regards

Maggie

Community Support Team _ Maggie Li
If this post helps, then please consider Accept Ashish_Mathur 'S answer as the solution to help the other members find it more quickly.

Frequent Visitor

## Re: Expense as % of Revenue - Matrix

Thanks Ashish!  That's brilliant.  I hadn't thought of that.  Sorry for the slow response, I've been away for a bit.

R.

Super User

You are welcome.