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

Thank you, Tom. This illustrates it very well. 

 

Jit

Ksharp
Super User

That would be very helpful if you could post some real/dummy data to explain your issue.

Here is an example for solving your issue.

 

data have;
input financed_amount payment_amount term;
cards;
400 100 5
400 200 3
400 300 2
;

filename x temp;
data _null_;
 set have end=last;
 file x;
 length repeat $ 2000;
 do i=1 to term;
  repeat=catx(',',repeat,payment_amount);
 end;
 if _n_=1 then put 'data want;';
 put 'financed_amount=' financed_amount ';payment_amount=' payment_amount ';term=' term ';irr=irr(1,-' financed_amount ',' repeat ');output;';
 if last then put 'run;';
run;

%include x/source;

 

 

Catch up on SAS Innovate 2026

Dive into keynotes, announcements and breakthroughs on demand.

Explore 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
  • 16 replies
  • 1031 views
  • 3 likes
  • 6 in conversation