BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Yul
Obsidian | Level 7 Yul
Obsidian | Level 7

שלום,

 יש לי מספר תצפיות ואני רוצה לדעת איך אני יכולה לראות בעמודה ליד 'הסכום' תמיד את הערך המינמלי (כמו שרואים בעמודה הראשונה מימין ולא כמו עמודה שניה מימין) שהיה עד אותה נקודה בעמודה SUM? 

id   sum  Min   actul_Min

x   37      

x   23      37       23

x   23      23       23

x   12                 12 

ניסיתי להשתמש ב

Until 

אבל מקבלת רק את התוצאה שרואים בMIN

או שאין אפשרות כזו?

1 ACCEPTED SOLUTION

Accepted Solutions
Hagay
SAS Employee

לא בטוח שהבנתי את הבעיה אבל משהו כזה?

 

data TEST_DATA;
	length 
		ID	8
		Sum	8;
	input id sum;
datalines;
1 37
2 23
3 23
4 12
;
run;

data TEST_DATA1;
	set TEST_DATA;
	retain Actual_Min .;
	if _n_=1 then actual_min=sum;
	if sum<actual_min then actual_min=sum;
run;

View solution in original post

1 REPLY 1
Hagay
SAS Employee

לא בטוח שהבנתי את הבעיה אבל משהו כזה?

 

data TEST_DATA;
	length 
		ID	8
		Sum	8;
	input id sum;
datalines;
1 37
2 23
3 23
4 12
;
run;

data TEST_DATA1;
	set TEST_DATA;
	retain Actual_Min .;
	if _n_=1 then actual_min=sum;
	if sum<actual_min then actual_min=sum;
run;

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!

Discussion stats
  • 1 reply
  • 324 views
  • 0 likes
  • 2 in conversation