cancel
Showing results for
Did you mean:
Super Contributor

## Row level % in Matrix

My prob is have to calculate row level percentage in matrix report.

Table Explain:

Month from - Month master

Product (A,B,C) from - Product Master

Sales from - Sales master

Question is :

How to get row level percentage ? using DAX.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Super Contributor

## Re: Row level % in Matrix

Thanks @Sean

I got the solution, i did previously but i forgot it now i got it.

anyhow thanks buddy....

% Cal = Divide(Sum(Sales[Sales]), Calculate(Sum(Sales[Sales]),All(Date[month])))

7 REPLIES 7
Super Contributor

## Re: Row level % in Matrix

If your sales data is formatted as in the picture you posted - obviously you need to Unpivot first!

Then just use this measure - you basically need a total for each product which you can get with ALLEXCEPT

EDIT: Overall Total for each Product (Denominator)

```Measure =
DIVIDE (
SUM ( Sales[Sales] ),
CALCULATE ( SUM ( Sales[Sales] ), ALLEXCEPT ( Sales, Sales[Product] ) ),
0
)```

Super Contributor

## Re: Row level % in Matrix

Hi @Sean

Which i shown in picture that is not my data.

First 1 is which am getting now in Power BI, Second one is i need.

Super Contributor

## Re: Row level % in Matrix

So how are sales and product connected?

Super Contributor

## Re: Row level % in Matrix

I have product ID Relationship

Super Contributor

## Re: Row level % in Matrix

Thanks @Sean

I got the solution, i did previously but i forgot it now i got it.

anyhow thanks buddy....

% Cal = Divide(Sum(Sales[Sales]), Calculate(Sum(Sales[Sales]),All(Date[month])))

Super Contributor

## Re: Row level % in Matrix

Hi, this was my solution.

My% =
DIVIDE (
CALCULATE (
SUM ( Sales[Sales] );
ALLEXCEPT ( Sales; Sales[Product]; Sales[Month] )
);
CALCULATE ( SUM ( Sales[Sales] )ALLEXCEPT ( Sales; Sales[Product] ) )
)

Lima - Peru

Proud to be a Datanaut!

Super Contributor

## Re: Row level % in Matrix

Okay great!

```Measure 2 =
DIVIDE (
SUM ( Sales[Sales] ),
CALCULATE ( SUM ( Sales[Sales] ), ALL('Calendar') ),
0
)```

Announcements

Kudos to you if you earned one of these! Check your inbox for a notification.

#### Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

#### Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (1,552)