cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Display Last Entry in List

Hi All

 

I have a SharePoint List (though I'm connecting via OData as the source is PWA) and I'm trying to display only the last record in that list by date in a table. I've written some DAX as follows but still get each date entry displayed in the table. All the columns are in the same table.  Any ideas greatly appreciated!

 

Last Commentary 2 = VAR MyProject = MAX('ReportCommentary'[ProjectName])

VAR myFilteredTable = Filter('ReportCommentary', 'ReportCommentary'[ProjectName] = MyProject)

VAR LatestDate = MAXX(myFilteredTable,[Report Date])

VAR LatestCommentary = MAXX(filter(myFilteredTable, [Report Date]= LatestDate), 'ReportCommentary'[Brief Status Summary])

RETURN LatestCommentary


Thanks
Faye

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Display Last Entry in List

@Faye1901 ,

 

Modify your dax as below:

Last Commentary 2 =
VAR LatestDate =
    MAXX (
        FILTER (
            'ReportCommentary',
            'ReportCommentary'[ProjectName] = MAX ( 'ReportCommentary'[ProjectName] )
        ),
        [Report Date]
    )
VAR LatestCommentary =
    MAXX (
        FILTER (
            'ReportCommentary',
            'ReportCommentary'[ProjectName] = MAX ( 'ReportCommentary'[ProjectName] )
                && [Report Date] = LatestDate
        ),
        'ReportCommentary'[Brief Status Summary]
    )
RETURN
    LatestCommentary

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: Display Last Entry in List

@Faye1901 ,

 

Modify your dax as below:

Last Commentary 2 =
VAR LatestDate =
    MAXX (
        FILTER (
            'ReportCommentary',
            'ReportCommentary'[ProjectName] = MAX ( 'ReportCommentary'[ProjectName] )
        ),
        [Report Date]
    )
VAR LatestCommentary =
    MAXX (
        FILTER (
            'ReportCommentary',
            'ReportCommentary'[ProjectName] = MAX ( 'ReportCommentary'[ProjectName] )
                && [Report Date] = LatestDate
        ),
        'ReportCommentary'[Brief Status Summary]
    )
RETURN
    LatestCommentary

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors