BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Kurt_Bremser
Super User

In the first observation, DeltaEAs is set to zero, and the SUM function in the last statement of the data step will also set EAs_avant to zero (sum of a missing value and zero).

Then, in all observations where MT_EVT is negative (which it is in your example dataset), this formula is calculated:

DeltaEAs=EAs_avant*(MT_EVT/MT_EA_AVMVT)

Since EAs_avant is zero, the result of this is also zero.

So the SUM of EAs_avant (0) and DeltaEAs (0) will still be zero.

And so the zero perpetuates throughout your dataset.

SASdevAnneMarie
Barite | Level 11
Thank you Kurt ! I understood.
Have I nice day !

Marie

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!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 16 replies
  • 1810 views
  • 7 likes
  • 2 in conversation