Please enable JavaScript to view this site.

Vensim Help

Navigation: Reference Guide > Functions > Data Functions

X IF MISSING(expr,NUMBER) Replace datum with X IF datum is MISSING

Scroll Prev Top Next More

Returns a data combination filling missing data points with NUMBER.  Normally, if some but not all data for an expression is available at once, the expression will not be computed at all.  If you want to force computation at all times when any data is available for the variables in the expression, then use the X IF MISSING function.  This will cause NUMBER to be substituted for the value of the missing data.  

NOTE X IF MISSING of a single data series simply returns the data series regardless of the value of NUMBER.

Units:X IF MISSING(units,units) --> units

Restrictions:  Valid only in Data := equations. Must appear first on the right of the = sign and not be followed by anything else.  The NUMBER argument must be a numerical value.

Example

tot output data :=  X IF MISSING(SUM(output data[plant!]),0)

Availability: Note PLE or PLE Plus.

 

See also: Data Equations

Sample model: X IF MISSING.mdl in FunctionExamples