Page 1 of 1

delete series in a wf based on date

Posted: Thu Feb 23, 2023 2:30 pm
by mboll
I have a wf with many series, some for the period 1980-2021 and some for the period 1980-2031. I would like a code that easily deletes all series that only have values for the period 1980-2021. But I don't know the best way to do that. Super thankful for tips on how to solve this.

Re: delete series in a wf based on date

Posted: Thu Feb 23, 2023 3:50 pm
by EViews Gareth

Code: Select all

%serlist = @wlookup("*", "series") smpl 2022 @last for %j {%serlist} if {%j}.@obs=0 then d {%j} endif next smpl @all

Re: delete series in a wf based on date

Posted: Fri Feb 24, 2023 1:04 am
by mboll
Perfect, thanks!!