Simple pageunstack gone wrong
Posted: Fri May 29, 2026 9:46 pm
I want to import the attached (minimal) text files and unstack them into dated pages with two series: a and b. The text files differ with respect to the value column. The first file (test.txt) has variation in both the name and time dimension (i.e. all unique values), the second (test2.txt) has variation in the name dimension and the third (test3.txt) has variation in the time dimension.
test.txt
test2.txt
test3.txt
I thought that the following two steps would have worked for all the files.
First load the page and unstack it
to get the series valuea and valueb (as well as a series dateid, a pool name and a group value) and then do some cleanup
And this does work for the first two files, test.txt and test2.txt. But for test3.txt the first step doesn't create the series valuea and valueb (nor the group value) but instead a single series value. And then the second step naturally results in an empty page (albeit correctly dated).
What to do?
test.txt
Code: Select all
name period value
a 2000 1
a 2001 2
b 2000 3
b 2001 4Code: Select all
name period value
a 2000 1
a 2001 1
b 2000 2
b 2001 2Code: Select all
name period value
a 2000 1
a 2001 2
b 2000 1
b 2001 2I thought that the following two steps would have worked for all the files.
First load the page and unstack it
Code: Select all
pageload .\test.txt
pageunstack name dateid @ valueCode: Select all
delete name value dateid
rename value* *What to do?