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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.