Function | Description | |||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
String[] comments() | Return array of text inside comments.
| |||||||||||||||||||||||||||||||||||||||
String[] commentsDetails() | Returns array of comments in format datetime + text, e.g.: 216-08-12T15:24:22.486;text.
| |||||||||||||||||||||||||||||||||||||||
| Evaluates the passed expression with the specified filter. For example:
| |||||||||||||||||||||||||||||||||||||||
| Returns the aggregated value of the embedded expression. The aggregation is computed for the specified upper level. For example:
| |||||||||||||||||||||||||||||||||||||||
Double firstValue() | Returns the lowest value of selected level(measure). For example:
| |||||||||||||||||||||||||||||||||||||||
Double forEachRow('expression') | Computes the expression on data set row level and calculates the sum from particular results. Following example shows the difference of using multiplication within the
| |||||||||||||||||||||||||||||||||||||||
Double forEachRow('expression','aggregation') | Computes the expression on data set row level and calculates the aggregation based on the second parameter from particular results. Aggregation can include SUM, MIN, MAX, AVG, COUNT, DCOUNT. | |||||||||||||||||||||||||||||||||||||||
Double formatNumber(number value) | Formats the value according to the indicator's format from settings. | |||||||||||||||||||||||||||||||||||||||
Double formatNumber(number value, 'String pattern') | Formats the value according to the indicator's format from settings. String pattern allows you to control, how the format specified. | |||||||||||||||||||||||||||||||||||||||
Double lastValue() | Returns the lowest value of the selected level (measure). For example:
| |||||||||||||||||||||||||||||||||||||||
void eachMember(String attribute) { expression } | Computes the expression for particular attribute values defined by attribute parameter.
Refer to Formula best practices for correct usage. | |||||||||||||||||||||||||||||||||||||||
| Computes the expression for desired drill-down member values. Example:
This example returns the value of indicator Refer to Formula best practices for correct usage. | |||||||||||||||||||||||||||||||||||||||
| Computes the expression for particular members and calculates the sum from particular results. Following example shows the difference of using multiplication within the
Refer to Formula best practices for correct usage. | |||||||||||||||||||||||||||||||||||||||
| Computes the expression for particular members of the defined Refer to Formula best practices for correct usage. | |||||||||||||||||||||||||||||||||||||||
| Computes the expression for particular members and calculates the average value from particular results. Refer to Formula best practices for correct usage. | |||||||||||||||||||||||||||||||||||||||
| Computes the expression for particular members of the defined Refer to Formula best practices for correct usage. | |||||||||||||||||||||||||||||||||||||||
| Computes the expression for particular members and calculates the minimal value from particular results. Refer to Formula best practices for correct usage. | |||||||||||||||||||||||||||||||||||||||
| Computes the expression for particular members of the defined Refer to Formula best practices for correct usage. | |||||||||||||||||||||||||||||||||||||||
| Computes the expression for particular members and calculates the maximum value from particular results. Refer to Formula best practices for correct usage. | |||||||||||||||||||||||||||||||||||||||
| Computes the expression for particular members of the defined Refer to Formula best practices for correct usage. | |||||||||||||||||||||||||||||||||||||||
| Computes the expression for particular members of the defined
| |||||||||||||||||||||||||||||||||||||||
Double timeAttribute(String levelCode){ expression } | Computes the expression for particular members of the defined
| |||||||||||||||||||||||||||||||||||||||
| Returns the attribute code of current member. Example:
| |||||||||||||||||||||||||||||||||||||||
String localize(String attributeCode, String valueToLocalize) | ||||||||||||||||||||||||||||||||||||||||
String localize(String dataSetCode, String attributeCode, String valueToLocalize); | Method to load translations from referenced data set.
| |||||||||||||||||||||||||||||||||||||||
| Returns the attribute code and value of current member in following form [L_CODE={VALUE}]. Example:
| |||||||||||||||||||||||||||||||||||||||
| Returns the value of current member. Example:
| |||||||||||||||||||||||||||||||||||||||
printComments() | Returns formatted text of comments. No need to iterate over it. | |||||||||||||||||||||||||||||||||||||||
rank() { expression } | Returns numerical order (rank) of the indicatorappliedintheexpression within used drill-down. Example:
| |||||||||||||||||||||||||||||||||||||||
rank('L_DRILLDOWN', 'M_INDICATOR') | Rank will calculate over specific drill down. | |||||||||||||||||||||||||||||||||||||||
rank('L_DRILLDOWN', 'MEMBER', 'M_INDICATOR') | Rank will calculate over specific drill down and member
| |||||||||||||||||||||||||||||||||||||||
rankInner() { expression } | Returns numerical order (rank - ascending) of the indicator applied in the expression within all used drill-downs in the table. Example:
| |||||||||||||||||||||||||||||||||||||||
rankInner(true) { expression } | Returns numerical order (rank - descending) of the indicator applied in the expression within all used drill-downs in the table. Example:
| |||||||||||||||||||||||||||||||||||||||
setDebugOn(true) | Enables debug mode. Ifformulacontains error, table cell will contain detailed stack trace about error, chart and KPI label won't be rendered and error detail will be printed out. We recommend using this function only while debugging. If not debugging, delete or mark it as comment: //setDebugOn(true) | |||||||||||||||||||||||||||||||||||||||
withoutDateTime() { expression } | Opt-out from applied Date and Time intervals. Example:
| |||||||||||||||||||||||||||||||||||||||
withoutDrillDown() { expression } | Opt-out from applied Drill-downs. Example:
In cases, whentherearemultipledrill-downsappliedinthetable, some of the drill-downs can be excluded from the withoutDrillDownFunction function (the aggregation for the upper level will be displayed).
| |||||||||||||||||||||||||||||||||||||||
withoutFilter() { expression }
| Opt-out from applied filters. Example: (Filter is set to SEGMENT=SMB)
| |||||||||||||||||||||||||||||||||||||||
withoutReportFilter() { expression } | Only view filter and indicator filter will be applied (available since BellaDati 2.9.4). | |||||||||||||||||||||||||||||||||||||||
withoutViewFilter() { expression } | Only report filter and indicator filter will be applied (available since BellaDati 2.9.4). | |||||||||||||||||||||||||||||||||||||||
loadData('L_DRILLDOWN', 'M_INDICATOR') | Allows to load values of an indicator for all members of specifiedattribute. it can greatly improve the performance of formulas. The function returna map of members and their values. This map can be accessed by using function getMapValue()
The memberId has to have following format: [memberId] = [L_ATTRIBUTE={Value}]. Usually, the function is used toghether with withoutDrillDown().
It also possible to use rank or aggregation such as MAX, MIN etc.:
Instead of indicator, users can also retrieve first of last value of an attribute.
|
It is possible to define the time entry by formula. Following functions are applicable for these kind of formulas only.
Function | Description | |
---|---|---|
| Sets the parameter value. | |
| Loads the parameter value. | |
| Returns indicator from the context of the row of current table. This function returns also values of formula defined indicators (defined in report). Example:
|
Consider following example - we have several indicators with codes M_NAME_1
, M_NAME_2
and M_NAME_3
. These indicators are used in formulas 1 - 3. The time area is defined by time formulas 1 - 5.
| Time formula 1: | Time formula 2: | Time formula 3: | Time formula 4: | Time formula 5: |
Formula 1: | 1000 | 2000 | 3000 | 1000 | 1000 |
Formula 2: | 1000 | 2000 | 3000 | 2000 | 2000 |
Formula 3: | 1000 | 2000 | 3000 | 3000 | 3000 |
| 1000 | 2000 | 3000 | N/A | 1000 |
| 1000 | 2000 | 3000 | N/A | 2000 |
| 1000 | 2000 | 3000 | N/A | 3000 |
It is possible to obtain information about logged in user for your reporting needs.
Function | Description |
---|---|
String getSignedUserName() | Returns name of currently signed in user. |
String getSignedUserSurname() | Returns surname of currently signed in user. |
String getSignedUserEmail() | Returns email of currently signed in user. |
String getSignedUser() | Returns username of currently signed in user. |
BellaDati supports all Arrays from https://docs.oracle.com/javase/7/docs/api/java/util/Arrays.html and ArrayUtils from https://commons.apache.org/proper/commons-lang/javadocs/api-2.6/org/apache/commons/lang/ArrayUtils.html.
Syntax: first define name of the package, then use desired method.
Example:
def int[] a = [1,2,3]
a = ArrayUtils.add(a, 0)
Arrays.sort(a)
return a[3]