cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mrothschild
Helper V
Helper V

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 I
Super User I

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])))




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

Proud to be a Super User!




View solution in original post

2 REPLIES 2
mrothschild
Helper V
Helper V

@vanessafvg,

 

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

vanessafvg
Super User I
Super User I

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])))




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

Proud to be a Super User!




View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Top Solution Authors
Top Kudoed Authors