Exporting data without zeros

Use this forum to post Vensim related questions.
Post Reply
pav80
Member
Posts: 32
Joined: Fri Jan 24, 2014 11:09 am
Vensim version: DSS

Exporting data without zeros

Post by pav80 »

Hi,

Was wondering whether in Vensim there is an option than when you export a data matrix that it can automatically truncate the data matrix to get rid of zeros?

For example if you have a matrix from 1970 to 2050 (you want each year to appear), but on the X axis you might have more than 100 countries, but some of these countries for some of the variables across the time series 1970 to 2050 are always 0. So in other words could Vensim already identify automatically those that for the cumulative time period 1970 to 2050 and delete them/or not export them?

This could make in certain cases of exporting data the exported data file smaller.

Thanks, Pawel
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Exporting data without zeros

Post by Administrator »

Not really. We'd need to program into Vensim the ability to check a time series for zeros and not output them. Also we'd need some way of implementing this in the user interface. This is not really what Vensim is designed for, data manipulation like this needs to be done via a programming language, so Excel and some simple VBA would be the correct way to post-process the file.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
pav80
Member
Posts: 32
Joined: Fri Jan 24, 2014 11:09 am
Vensim version: DSS

Re: Exporting data without zeros

Post by pav80 »

Thank you for the prompt reply.
Agree that this could be done in Excel with VB for example.
But still could be a useful tool to have in Vensim directly as would make the analysts concentrate more on the output of Vensim rather than manipulating it.

Pawel
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Exporting data without zeros

Post by Administrator »

But still could be a useful tool to have in Vensim directly as would make the analysts concentrate more on the output of Vensim rather than manipulating it.
I'd argue that ignoring the zeros is manipulation of the output. Depends on the model/usage of it though.

I cannot think of any generic way of programming something like this into the user interface. It is custom manipulation, the only way to do it is via a programming language (or manually in Excel). But Excel can record your actions, so it could easily be done once, and the resulting code modified to make it more generic.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
pav80
Member
Posts: 32
Joined: Fri Jan 24, 2014 11:09 am
Vensim version: DSS

Re: Exporting data without zeros

Post by pav80 »

Thank you again
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Exporting data without zeros

Post by tomfid »

I can't remember how the export treats NA values, but it's possible that you could create an extra variable:

x no 0s = IF THEN ELSE( x = 0, NA, x )

and export that. The NAs might get skipped or left blank.
Post Reply