BookmarkSubscribeRSS Feed
hcbn
Obsidian | Level 7

Hi

If the value is equal to 12 in the qty column then I need to divide the qty column to the EOQ column. The result will be spreading in the requested output until the total is 12. If the value less than 12 then I will keep it as it is. Please, look at the value the qty column. The dest id column is also an indication. The restriction is based on the dest id column. 

Input  
dest_idqtyEOQ
13690122
1369002
1369002
1369002
1369002
1369002
1369002
1369002
1369002
1369002
1369002
1369002
1369002
1369002
13690122
1382703
1382703
1382703
1382703
1382703
13827123
13827123
1382703
1382703
1382703
1382703
1382703
1382703
1382703
1382703
1382703
1382703
1382703
1382703
1382703
13827123

 

 

Desired Output  
dest_idqtyEOQDesired Output
136901226
13690026
13690020
13690020
13690020
13690020
13690020
13690020
13690020
13690020
13690020
13690020
13690020
13690026
136901226
13827030
13827030
13827030
13827030
13827030
138271234
138271234
13827034
13827034
13827034
13827034
13827030
13827030
13827030
13827030
13827030
13827030
13827030
13827034
13827034
138271234
1 REPLY 1
hcbn
Obsidian | Level 7

@novinosrin  Do you have any idea? For each dest id in the column, the desired output will be renewed. Thank you.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 464 views
  • 0 likes
  • 1 in conversation