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
vbourbeau
Resolver II
Resolver II

Average on Matrix Subtotals

Hi BI expert,

I try to do something who are probably obvious

I have a matrix with 2 line where we can drag down. l want to put the average of the total sales.

Ex:

Client        Sales      Average

Client1      2000$       50%

Client2      1000$       25%

Client3      1000$       25%

Total         4000$       100%

 

And if we drag down

 

Client        Part      Sales      Average

Client1         1        1000$       50%

                    2          500$       25%

                    3          500$       25%

                 Total      2000$      50%

Client2                   1000$       25%

Client3                   1000$       25%

Total                       4000$       100%

 

 

1 ACCEPTED SOLUTION

Also I need to add 

ISFILTERED function to be able to change the ALLEXCEPT depend of the hierarchy I'm in.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

I'm not sure I understand your goal here. Could you elaborate further?

 

Thanks,

Ben

Ok,

 

If you look the first example I want to add the last column the average of sales. my client 1 sale for 2000$ what is 50% of my total sales. How can I add this Column?

 

Also if I drag down in the matrix I have each part sale for a specific client. I want to have the average of each part on the client sales. the part 1 sale 1000$ what is 50% of the total sales of this client.

ok look what I've done.

I create a new measure who keep the total sales for all the matrix

Total locked = calculate([Total]; ALLEXCEPT(table;somefilter))
 
And I divide
Average sales = divide([total];[total locked]
 
I got this:

Client        Sales      Average

Client1      2000$       50%

Client2      1000$       25%

Client3      1000$       25%

Total         4000$       100%

 

But when I drill down

Client        Part      Sales      Average

Client1         1        1000$       25%

                    2          500$       12.5%

                    3          500$       12.5%

                 Total      2000$      50%

Client2                   1000$       25%

Client3                   1000$       25%

Total                       4000$       100%

 

It's probably normal, but what I want is to have the average of the drill down value on the drill down total and not on the total sales. 

 

Client1         1        1000$       50%

                    2          500$       25%

                    3          500$       25%

 

 I want when I look for one client what is the percentage of sales for part 1 on is total sale to him not to all client.

Also I need to add 

ISFILTERED function to be able to change the ALLEXCEPT depend of the hierarchy I'm in.

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.