推 BugEater: LAG is called in conditional code, the value it 06/17 12:01
→ BugEater: returened is not the value from the previous 06/17 12:02
→ BugEater: but is the value of its previous execution. 06/17 12:03
→ BugEater: try this. data A;set A; by name; 06/17 12:04
→ BugEater: if first.name then Nth=0; 06/17 12:06
→ BugEater: Nth=Lag(Nth)+1;run; 06/17 12:07
→ faceoflove56: 感謝>"< 06/18 13:00
→ luenchang: It's not recommended to use LAG() within a logical 06/19 02:38
→ luenchang: condition (i.e. if then). Check out how the LAG() 06/19 02:39
→ luenchang: works in this article 06/19 02:40
→ luenchang: "Please Don't Lag Behind LAG! " 06/19 02:40