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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
WDMB
New Member

Return a text value based on the max value of another column

First time poster, so sorry if it's in the wrong place. 

 

Wondering the best way to select the Critter ("TAS FC C3") based on highest "PutUp" value (60) for a given Ticket. Ideally I'd like to return just the Ticket and the Critter. 

 

WDMB_0-1654710048524.png

 

Thanks!

 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @WDMB ,

 

Try this:

Max Critter = 
VAR MaxPutUp =
    CALCULATE ( MAX ( 'Table'[PutUp] ), ALLEXCEPT ( 'Table', 'Table'[Ticket] ) )
RETURN
    CALCULATE ( MAX ( 'Table'[Critter] ), 'Table'[PutUp] = MaxPutUp )

Icey_0-1655109465483.png

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Icey
Community Support
Community Support

Hi @WDMB ,

 

Try this:

Max Critter = 
VAR MaxPutUp =
    CALCULATE ( MAX ( 'Table'[PutUp] ), ALLEXCEPT ( 'Table', 'Table'[Ticket] ) )
RETURN
    CALCULATE ( MAX ( 'Table'[Critter] ), 'Table'[PutUp] = MaxPutUp )

Icey_0-1655109465483.png

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

tamerj1
Super User
Super User

Hi @WDMB 

I assume you are slicing by ticket number and date. Please try 

Max Critter =
VAR MaxPutUp =
    MAX ( TableName[PutUp] )
RETURN
    MAXX ( FILTER ( TableName, TableName[PutUp] = MaxPutUp ), TableName[Critter] )

 

Thanks @tamerj1 . Not slicing on date. I just want to retreive the Critter with the highest quantity of PutUp for any given Ticket. Most Tickets only have one Critter, but those that have more than one, I just need the Critter with the most PutUp. 

@WDMB 

Same code should work. 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.