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
mrothschild
Continued Contributor
Continued Contributor

MAXX with SUMAMRIZE or GROUPBY?

I have data similar to the following:

 

While I'm able to get a Location_Measure max Number by Location, I don't quite understand the SUMMARIZE or GROUPBY function with MAXX to get the maximum number by City or Country. 

 

Desired output is a City_Measure that equals 130 and Country_Measure that equals 180

 

CountryCityLocationNumber
USANYA10
USALAB65
USALAC65
UKLondonD60
UKLondonE60
UKBrightonF60
1 ACCEPTED SOLUTION
vanessafvg
Super User
Super User

how do you want to use this data?

 

something like this could work but depending on how you using it

City_Measure = MAXX(DISTINCT('Table'[City]), CALCULATE(SUM('Table'[Number]))))
Country_Measure = MAXX(DISTINCT('Table'[Country]), CALCULATE(SUM('Table'[Number])))




If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
mrothschild
Continued Contributor
Continued Contributor

@vanessafvg,

 

Thanks so much.  The output will be used in a measure or a card.  This is exactly what I needed!

vanessafvg
Super User
Super User

how do you want to use this data?

 

something like this could work but depending on how you using it

City_Measure = MAXX(DISTINCT('Table'[City]), CALCULATE(SUM('Table'[Number]))))
Country_Measure = MAXX(DISTINCT('Table'[Country]), CALCULATE(SUM('Table'[Number])))




If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




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.