Page 1 of 1
Text object question
Posted: Fri Oct 31, 2025 10:53 am
by helpmecodeplease
Can you make a text object that combines text and the last observation of a series? Eg. the text object created in a program would say, 'the price of oil was" {then the last observation of the oil series] in [then the month of the last observation]
Thanks
Re: Text object question
Posted: Fri Oct 31, 2025 11:33 am
by EViews Gareth
Code: Select all
wfcreate m 1990 2020
series oil = @nrnd
smpl @last-4 @last
oil = na
smpl @all
text mytxt
%val = @str(@last(oil))
%last = oil.@last
%msg = "The last price of oil was: " + %val + " in " + %last
mytxt.append {%msg}
show mytxt
Re: Text object question
Posted: Fri Oct 31, 2025 11:41 am
by helpmecodeplease
Awesome, thanks Gareth. What if I want it to give me a different observation? Say that observation in the month that a different series had its last observation. So I want to talk about about variable1 which goes to 2025m10 but refer to variable1's observation in the last month of variable2's series?
Re: Text object question
Posted: Fri Oct 31, 2025 1:59 pm
by EViews Gareth