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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Summarize Table by Max Value index

image.png

This is the table that I have. I'm trying to make a summary table that only grabs the rows with the largest value index. In this sample data, it would be Index value 9.

 

Thank you!

5 REPLIES 5
az38
Community Champion
Community Champion

Hi @Anonymous 

try

Table = 
var _maxIndex = CALCULATE(MAX(Table[Index]), ALL(Table))
RETURN 
FILTER(Table, Table[Index] = _maxIndex)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

@az38 

This worked great for one value, how would I modify this if I have multiple G1ROLL values with Separate index's? 

 

Here's a picture of what I'm referencing.

image.png

az38
Community Champion
Community Champion

@Anonymous 

try

Table = 
var _maxIndex = CALCULATE(MAX(Table[Index]), ALLEXCEPT(Table, Table[G1ROLL]))
RETURN 
FILTER(Table, Table[Index] = _maxIndex && Table[G1ROLL] = MAX(Table[G1ROLL]))

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

@az38 

 

This had no errors but it returned no rows. There's a potential case where the indexes might have a duplicate and it would be okay if it pulls that duplicate.

az38
Community Champion
Community Champion

@Anonymous 

sorry, my bad.try

Table 2 = 
FILTER(
ADDCOLUMNS(
'Table',
"R", RANKX(FILTER('Table', 'Table'[G1ROLL]=EARLIER('Table'[G1ROLL])), 'Table'[Index], , DESC)
),
[R] = 1
)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors