BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
lola_rodriguez
Calcite | Level 5

Hi all, 

 

I have a datasets that contains movies and how many people have watched it. 

 

I would like to create a new variable (Position) that Position=1 if that movie is the most streamed, Position=2 if that movie is the second most streamed movie, etc...

1 ACCEPTED SOLUTION

Accepted Solutions
maguiremq
SAS Super FREQ

PROC RANK is probably best here. If a movie has the same amount of views, what do you want to do with ties?

View solution in original post

2 REPLIES 2
maguiremq
SAS Super FREQ

PROC RANK is probably best here. If a movie has the same amount of views, what do you want to do with ties?

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 442 views
  • 3 likes
  • 2 in conversation