it should work , I used analystic function it works fine.
what is the error it gives. did you try your sql in sqlplus ?