Forum Discussion
Annemie19
5 years agoHelper II
Get latest date for certain task ID
Hi,
I have the data as shown below:
| Entity Id | Covenant ID | Covenant Sub Type | TaskID | Latest Comment Date |
| 21632312 | 108 | Net Interest Cover | 38499 | 11/11/2020 |
| 21632312 | 108 | Net Interest Cover | 38499 | 02/11/2020 |
| 21632312 | 109 | Leverage Ratio | 38508 | 11/11/2020 |
| 21632312 | 109 | Leverage Ratio | 38508 | 02/11/2020 |
| 21632312 | 110 | Capital Expenditure | 38517 | 02/11/2020 |
| 21632312 | 110 | Capital Expenditure | 38517 | 11/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
What measure can I write for this?
Kind Re
3 Replies
- amitchandakSuper User
Annemie19 , Create a measure like
Last Date = calculate(max(Table[Latest Comment Date]), filter(Table, Table[Latest Comment Date] = calculate(max(Table[ Latest Comment Date]), allexcept(Table, Table[TaskID]))) )
- Annemie19Helper II
amitchandak, Thanks for the help.
However, 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 columnEntity Id Covenant ID Covenant Type Covenant Sub Type TaskID Days Overdue Latest Comment CovenantCommentsTimestamp LAST DATE 21632312 108 Financial Covenant Net Interest Cover 38500 -26 Covenant returned for amendments. Reason: Capture as Net interest cover, covenant sub type . 11/11/2020 21632312 108 Financial Covenant Net Interest Cover 38500 -26 Covenant returned for amendments. Reason: Quarterly except FYE(march) . 02/11/2020 21632312 108 Financial Covenant Net Interest Cover 38501 -208 Covenant returned for amendments. Reason: Capture as Net interest cover, covenant sub type . 11/11/2020 21632312 108 Financial Covenant Net Interest Cover 38501 -208 Covenant returned for amendments. Reason: Quarterly except FYE(march) . 02/11/2020 - AnonymousNot applicable
Same problem with me I have project and each project have multiple task and its task completion date I want to show latest task based on latest date in power bi could any one help me