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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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