Forum Discussion
Find most recent date
Hi all,
I am looking for a solution to calculate the most recent_ready_date if the LOCATION and the PARTNUMBER_SUP is the same
In the last column I mentioned the outcome of the calculation.
Thanks for your help!
John
| location | ready_dat | partnumber_sup | most_recent_ready_date |
| City | 12/28/2021 | AM171081201 | 12/28/2021 |
| City | 9/23/2021 | AM171081201 | 12/28/2021 |
| Holland | 11/12/2021 | 120039501SV | 11/12/2021 |
| Holland | 7/20/2021 | 120039501SV | 11/12/2021 |
| America | 12/27/2021 | AM171081201 | 12/27/2021 |
| America | 6/3/2021 | AM171081201 | 12/27/2021 |
Anonymous , Try a new column like
maxx(filter(Table, [location] = earlier([location]) && [PARTNUMBER_SUP] = earlier([PARTNUMBER_SUP])), [ready_dat])
a nw measure like
maxx(filter(allselected(Table), table[location] = max(table[location]) && table[PARTNUMBER_SUP] = max(table[PARTNUMBER_SUP])), table[ready_dat])
most recent ready date: =
IF (
ISINSCOPE ( Data[location] ),
IF ( COUNTROWS ( Data ) > 1, MAX ( Data[ready_dat] ) )
)
2 Replies
- amitchandakSuper User
Anonymous , Try a new column like
maxx(filter(Table, [location] = earlier([location]) && [PARTNUMBER_SUP] = earlier([PARTNUMBER_SUP])), [ready_dat])
a nw measure like
maxx(filter(allselected(Table), table[location] = max(table[location]) && table[PARTNUMBER_SUP] = max(table[PARTNUMBER_SUP])), table[ready_dat])
- Jihwan_KimSuper User
most recent ready date: =
IF (
ISINSCOPE ( Data[location] ),
IF ( COUNTROWS ( Data ) > 1, MAX ( Data[ready_dat] ) )
)