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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
sirgseymour
Helper I
Helper I

Displaying the latest date for a subset of records in a table

Hello,

 

I have a table that contains a list of Portfolios that are updated independantly periodically independantly and I want to display the latest date that each one of these portfolios were updates. In the table below, I want to calculate the LatestRollupdate for each Portfolio and then add an indicator for Latest/Not? I have used the following measures and column formulas but am unable to filter the measure by Portfolio. Any ideas?

 

Measure:

Last Date = CALCULATE(Table1[Rollup Date],ALL(Table1)) - Returns the laset date for whole table not filtered by Portfolio

 

Column:

 

Latest Portfolio = if(Table1[Rollup Date]=Table1[Last Date],"Latest","Not")

 

 

PortfolioRollup DateLatest Rollup DateLatest/Not?
101-09-1810-09-18Not
102-09-1810-09-18Not
104-09-1810-09-18Not
110-09-1810-09-18Latest
203-09-1805-09-18Not
205-09-1805-09-18Latest
305-10-1812-11-18Not
311-11-1812-11-18Not
312-11-1812-11-18Latest
401-10-1822-10-18Not
402-10-1822-10-18Not
403-10-1822-10-18Not
422-10-1822-10-18Latest
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @sirgseymour,

 

You can use below formula to achieve your requirement:

Measure formula:

Last Date = 
CALCULATE (
    MAX ( 'Sample'[Rollup Date] ),
    ALLSELECTED ( 'Sample' ),
    VALUES ( 'Sample'[Portfolio] )
)

Calculate column formula:

Is Last = 
VAR _lastdate =
    CALCULATE (
        MAX ( 'Sample'[Rollup Date] ),
        FILTER ( ALL ( 'Sample' ), [Portfolio] = EARLIER ( 'Sample'[Portfolio] ) )
    )
RETURN
    IF ( [Rollup Date] = _lastdate, "LastDate", "Not" )

 

Regards,
Xiaoxin Sheng

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

 

Write these 2 calculated column formulas

 

Latest Rollup Date=CALCULATE(MAX(Table1[Rollup Date]),FILTER(Table1,Table1[Portfolio]=EARLIER(Table1[Portfolio])))

Latest/Not?=IF([Latest Rollup Date]=[Rollup Date],"Latest","Not")

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @sirgseymour,

 

You can use below formula to achieve your requirement:

Measure formula:

Last Date = 
CALCULATE (
    MAX ( 'Sample'[Rollup Date] ),
    ALLSELECTED ( 'Sample' ),
    VALUES ( 'Sample'[Portfolio] )
)

Calculate column formula:

Is Last = 
VAR _lastdate =
    CALCULATE (
        MAX ( 'Sample'[Rollup Date] ),
        FILTER ( ALL ( 'Sample' ), [Portfolio] = EARLIER ( 'Sample'[Portfolio] ) )
    )
RETURN
    IF ( [Rollup Date] = _lastdate, "LastDate", "Not" )

 

Regards,
Xiaoxin Sheng

Thank you that worked!!1

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.