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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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