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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Darrell
Frequent Visitor

MAXX - Need the Market Name, Not the MAX Value - I'm so close.

I've tried MAXX() around the ADDCOLUMNS(), but that just gives me the value of 31.837.

 

I want the Market Name returned "04167-Boston".

 

 

EVALUATE
    ADDCOLUMNS (
        SUMMARIZE (
             STORE_CONNECT,
             STORE_CONNECT[Market]
	 ),
        "WOS", DIVIDE ( CALCULATE ( [OH] ), CALCULATE( [Sales] ) )         	
    )

 

 

 

 

MARKET              WOS
04167-Boston	    31.8373525792809
04253-NewYork	    28.7424878959799
03044-Charleston    25.8248559556622
00654-Minneapolis   24.9126105413978
05515-Tempe	    24.8818140998196
04456-Anaheim	    22.9656216911629

 

 

 

 

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

HI @Darrell 

 

Try this:

Measure = 
Var _A = 
ADDCOLUMNS (
        SUMMARIZE (
             STORE_CONNECT,
             STORE_CONNECT[Market]
	 ),
        "WOS", DIVIDE ( CALCULATE ( [OH] ), CALCULATE( [Sales] ) )         	
    )
Var _B = MAXX(_A,[WOS])
Var _C = Filter(_A,[WOS]=_B)
return
MAXX(_C,[MARKET])

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

View solution in original post

2 REPLIES 2
VahidDM
Super User
Super User

HI @Darrell 

 

Try this:

Measure = 
Var _A = 
ADDCOLUMNS (
        SUMMARIZE (
             STORE_CONNECT,
             STORE_CONNECT[Market]
	 ),
        "WOS", DIVIDE ( CALCULATE ( [OH] ), CALCULATE( [Sales] ) )         	
    )
Var _B = MAXX(_A,[WOS])
Var _C = Filter(_A,[WOS]=_B)
return
MAXX(_C,[MARKET])

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

Thanks @Vahid - that did the trick.   I appreciate it!

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors