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

View all the Fabric Data Days sessions on demand. View schedule

Reply
CEllis
Resolver I
Resolver I

Filter the most recent result in a vertical table

 

I am trying to get the most recent result based on the maximum collection point.

 

SourceTable

NameCollectionResult
Name 1145
Name 1267
Name 2154
Name 3178
Name 3245
Name 3357
Name 4178
Name 4292
Name 5156

 

I use the DAX below to create the output table but the 'Current' DAX is giving me the average of all collections not the desired output shown below.

 

 

1 = CALCULATE(AVERAGE('SourceTable'[Result]),Filter(All('SourceTable'[Collection]),'SourceTable'[Collection]=1))

2 = CALCULATE(AVERAGE('SourceTable'[Result]),Filter(All('SourceTable'[Collection]),'SourceTable'[Collection]=2))

3 = CALCULATE(AVERAGE('SourceTable'[Result]),Filter(All('SourceTable'[Collection]),'SourceTable'[Collection]=3))

MostRecent = CALCULATE(MAX('SourceTable'[Collection]))

Current = CALCULATE(AVERAGE('SourceTable'[Result]),FILTER('SourceTable','SourceTable'[Collection]=[MostRecent]))

 

 

 

OutPutTable

Name123Most RecentCurrent
Name 14567 267
Name 254  154
Name 3784557357
Name 47892 292
Name 556  156

 

 

Many thanks

 

Chris

 

 

1 ACCEPTED SOLUTION
Hema_Gupta
Frequent Visitor

Hi,

Hope this helps.

Hema_Gupta_0-1708511486307.png

 

View solution in original post

3 REPLIES 3
Hema_Gupta
Frequent Visitor

Hi,

Hope this helps.

Hema_Gupta_0-1708511486307.png

 

Hi @Hema_Gupta 

Many thanks

It works with out the name in, if I add it in it trys do MAX on a text field and doesnt like it.

Current = 

Var MostRecentCollection = Max('Primary Assessment'[Collection])

RETURN

        CALCULATE(AVERAGE(Collections[Result]),
            FILTER(
                ALL(Collections),
                Collections[Collection] = MostRecentCollection
            )
        )




juvana20
New Member

Filter the most recent result in a vertical table by applying sorting or filtering criteria based on the timestamp or date column. This helps prioritize and display the latest data entry at the top or in a designated position within the table, enhancing readability and usability.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors