I am doing a rank over partition in an attempt to get a unique count of procedural steps. the problem is the partition field is not unqiue, and I am trying to increment the step: Here is a sample from the data:
the approach I am using is:
case when Type='Procedure' then rank() OVER (partition by Type ORDER BY ActionDate) end as PSeq,
I understand why the 5 is repeating because I am using actiondate and the two dates are the same.
Any thoughts how I can get around this since the second 5 needs to be a 6.