This is my data
SerialNumber Reading Date
A 4 10/30/2019
A 4 10/29/2019
A 3 10/28/2019
B 11 10/30/2019
B 9 10/29/2019
B 6 10/28/2019
C 25 10/30/2019
C 25 10/15/2019
C 25 10/13/2019
C 21 10/9/2019
C 21 10/3/2019
I need to be able to either create a measure or a calculated column that tells me the date of when each serial number last changed. So i need this:
SerialNumber Reading Date DateChanged
A 4 10/30/2019 10/28/2019
A 4 10/29/2019 10/28/2019
A 3 10/28/2019 10/28/2019
B 11 10/30/2019 10/29/2019
B 9 10/29/2019 10/29/2019
B 6 10/28/2019 10/29/2019
C 25 10/30/2019 10/9/2019
C 25 10/15/2019 10/9/2019
C 25 10/13/2019 10/9/2019
C 21 10/9/2019 10/9/2019
C 21 10/3/2019 10/9/2019
Here is the code I tried, but it only gave me the max date for each SerialNumber
Column = CALCULATE(
MAX(
SMU_Lookup[Date]),
FILTER(
ALL(SMU_Lookup),
SMU_Lookup[Reading] < MAX(SMU_Lookup[Reading])
&& SMU_Lookup[SerialNumber] = EARLIER(SMU_Lookup[SerialNumber])
)
)
Thanks in advance!