Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
raymond
Post Patron
Post Patron

SUM the MAX Values

Hi everyone,

 

I browsed through several topics but couldnt find an answer...so I am writing now 🙂

 

I have a Matrix with several Max Values. The Matrix has the granularity of "City". However, I want to SUM the MAX values for that given Country. 

2021-06-01 17_37_01-sample - Excel.png

 

Think of the values in the columns as people with blond, brunette and black hair. Hence in Germany we have 3 hair types in total and not 4 (which would be the sum). In Munich we have 1 hair type.

1 ACCEPTED SOLUTION
raymond
Post Patron
Post Patron

I have found a solution on my own. It was after all more simple than I have initially thought.

Value = 
MAXX( TABLE ,TABLE[Max value A] ) +
MAXX( TABLE ,TABLE[Max value B] ) +
MAXX( TABLE ,TABLE[Max value C] )

View solution in original post

7 REPLIES 7
raymond
Post Patron
Post Patron

I have found a solution on my own. It was after all more simple than I have initially thought.

Value = 
MAXX( TABLE ,TABLE[Max value A] ) +
MAXX( TABLE ,TABLE[Max value B] ) +
MAXX( TABLE ,TABLE[Max value C] )
v-luwang-msft
Community Support
Community Support

Hi @raymond ,

You could try the following measure:

Measure = CALCULATE(MAX('Table'[Max value A])+MAX('Table'[Max value B])+MAX('Table'[Max value C]),FILTER(ALL('Table'),'Table'[Country]=MAX('Table'[Country])))

 

base  data:

v-luwang-msft_0-1622707010496.png

 

And final output:

v-luwang-msft_1-1622707024226.png

Wish it is helpful for you!

 

Best Regards

Lucien

Nathaniel_C
Super User
Super User

Hi @raymond ,
What is your logic that Germany's sum is 3 and not 4?

 





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

Proud to be a Super User!




Thank you.

I want to find out how many values generally occur for each country. In Germany only 3 attributes or traits occur. 

 

Think of it as people with blond, brunette and black hair. Hence in Germany we have 3 hair types and not 4. In Munich we have 1 hair type.

selimovd
Super User
Super User

Hey @raymond ,

 

the following should work:

 

 

New Column = CALCULATE( MAX( myTable[Max Value A] ), ALLEXCEPT( myTable, myTable[City] ) ) + CALCULATE( MAX ( myTable[Max Value B] ), ALLEXCEPT( myTable, myTable[City] ) ) + CALCULATE( MAX ( myTable[Max Value C] ), ALLEXCEPT( myTable, myTable[City] ) )

 

 

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

 

amitchandak
Super User
Super User

@raymond , If Max Value A , MAx Value B are column values not measure

then try

sumx(summarize(Table, Table[country], Table[city], "_1", CALCUALTE(Max(Table[Value]))), [_1])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Thank you @amitchandak and @Nathaniel_C but unfortunately this wasnt working the way it was intended.

 

Think of the values in the columns as people with blond, brunette and black hair. Hence in Germany we have 3 hair types and not 4. In Munich we have 1 hair type.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.