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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 447 views
  • 0 likes
  • 1 in conversation