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
stizein
Helper I
Helper I

Matrix - sum of max filter values

I have an excel file that contains records that may be associated with multiple branch locations.  I want to display the aggregate $ amount for the account in a matrix.  How do I best approach this?  Sum on the max value?  Summing the detail records would inflate the $ amount.  The user would like to filter on the branch.  Thanks in advance for the direction.

 

stizein_0-1604694439764.png

 

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi @stizein ,

Whether your problem has been resolved? If no, you can try to create the below two measures. And apply [Measure 2] in Values field of your matrix. Otherwise, could you please mark the helpful post as Answered? It will help other members in the community find the solution easily if they face the similar problem with you. Thank you.

 

Measure =
CALCULATE (
    MAX ( 'Table'[Commission] ),
    FILTER ( 'Table', 'Table'[Branch] = MAX ( 'Table'[Branch] ) )
)
Measure 2 = SUMX ( VALUES ( 'Table'[Branch] ), [Measure] )

 

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
MFelix
Super User
Super User

Hi @stizein ,

 

If the values are repeated in all the records you can use the MAX / MIN / Average value that this would do the result you need for a single branch, however be carefull because the total values will also assume that.

 

So if you want to show the total by branch and then the total of all branches you need to use a SUMX with the usage of MAX, MIN or AVERAGE within a summarized measure.

 

This also depends on what is the calculation you need to what I can see the duplication of values comes in the line so you can do a similar measure to this one:

Measure = sumx(SUMMARIZE('Table','Table'[Line],"@PremiumValue",MAX('Table'[EB Premium])),[@PremiumValue])

MFelix_0-1604831115144.png

You need to do one measuree for each of the values you need to calculate

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



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.