Factory-Specific Spectre Functions

The following Spectre functions are available only in the factory configuration file. These functions do not work in other Spectre file types.

current_date()

Returns the current date as stated at the top of the factory configuration file. For example:

scope "Discharges" data-set="Accounts" {

filter `value("Date") != null and value("Date") <= current_date()`

alias "Date" "Discharge Date"

alias "Day of Week" "Discharge Day of Week"

}

 

measure()

Returns the summary value for the measure. For example:

summaries {

summary "% Total" `measure("Total Dischares") * 100 / parent(measure("Total Discharges"))` format="#.0\"%\""

summary "Acute Discharge" `measure("Acute Discharges")`

}

 

TIP: DivePort measures portlets automatically filter the window using the union of the column time series filters. If all columns use the same time series, you can use the parent function to make a "% Total" measure.