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
Annemie19
Helper II
Helper II

Return only last date

I have the data as shown below:

 

Entity IdCovenant IDCovenant Sub TypeTaskIDLatest Comment Date
21632312108Net Interest Cover3849911/11/2020
21632312108Net Interest Cover3849902/11/2020
21632312109Leverage Ratio3850811/11/2020
21632312109Leverage Ratio3850802/11/2020
21632312110Capital Expenditure3851702/11/2020
21632312110Capital Expenditure3851711/11/2020

 

for each covenant ID and task ID I only want to show the last 'Latest Comment Date'. 

For instance if you look at Task ID 38499 I only want to see the 'Latest Comment Date' as 02/11/2020

 

 

This is the measure I used. 

 

LAST DATE =  calculate(max(VwCovenant[CovenantCommentsTimestamp]), filter(VwCovenant, VwCovenant[CovenantCommentsTimestamp] = calculate(max(VwCovenant[CovenantCommentsTimestamp]), allexcept(VwCovenant, VwCovenant[TaskID]))) )
 
And it is returning a blank column
Entity IdCovenant IDCovenant TypeCovenant Sub TypeTaskIDDays OverdueLatest CommentCovenantCommentsTimestampLAST DATE
21632312108Financial CovenantNet Interest Cover38500-26Covenant returned for amendments. Reason: Capture as Net interest cover, covenant sub type .11/11/2020 
21632312108Financial CovenantNet Interest Cover38500-26Covenant returned for amendments. Reason: Quarterly except FYE(march) .02/11/2020 
21632312108Financial CovenantNet Interest Cover38501-208Covenant returned for amendments. Reason: Capture as Net interest cover, covenant sub type .11/11/2020 
21632312108Financial CovenantNet Interest Cover38501-208Covenant returned for amendments. Reason: Quarterly except FYE(march) .02/11/2020 

 

 

But the last date is comming up empty. 

I'm not sure how to correct this. 

 

Annemie

3 REPLIES 3
amitchandak
Super User
Super User

@Annemie19 , create measures like this

 

Last Comment = calculate(max(Table[Comment]), filter(Table, Table[Comment Date] = calculate(max(Table[Comment Date]), allexcept(Table, Table[TaskID]))) )

@amitchandak , this is still giving me a blank value

@Annemie19 , Check if the attached file after signature can help

 

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.

Top Solution Authors