I have a table that looks something like this:
I want to mark the latest distinct value from ID as valid, so i want the result to look something like this:
Row 3 have the same ID as Row 2 and Row 3 is older then Row 2, thats why i want valid to be 0 on Row 2.
Can anyone help me? Thanks!
@AndreasMoller try below
if(ID=Previous(ID),0,1) as Valid
Order by ID, Date desc;
Drop Table Data;
View solution in original post
That will do it, thank you!