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
johndoe293
New Member

How to select values based on max index inside groups

Hello,

I'm stuck trying to build both a table and a line chart where the data is grouped by day, month, and year and the table needs to show the balance of the last index by groups.

This is the dataset. Each date has multiple index values and I need to select the Balance of the highest index, based on date.  This will be used as input in a line chart to plot ending balance of the day.

data.png

I've played around with SUMX, TOPN, and MAXX  but can't seem to cross reference correctly.

1 ACCEPTED SOLUTION
johndoe293
New Member

Moments after posting I managed to figure it out...

New Measure:
Last Balance = SUMX(TOPN(1,Table, Table[Index], DESC), Journal[Balance])
data 2.PNG

View solution in original post

1 REPLY 1
johndoe293
New Member

Moments after posting I managed to figure it out...

New Measure:
Last Balance = SUMX(TOPN(1,Table, Table[Index], DESC), Journal[Balance])
data 2.PNG

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.

Top Solution Authors