You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

It is recommended to get familiar with crossValue, memberValue and filter function before proceeding with this tutorial.

CrossValue function is used to access Indicators from other Data Sets.

It receives two parameters:

  1. Cube name
  2. Indicator name

Following example returns Students count from Results data set.

crossValue('CUBE_RESULTS.RESULTS', 'L_STUDENT_COUNT')

Access cross reference function from Formulas help to predefine Cube name.

Cross Reference with Drill-down

When cross-referencing values, BellaDati does not take in consideration applied drill-downs. It is possible that it will display same value for each member.

Therefore, you need to explicitelly tell BellaDati, which member is currently being processed.

You can achieve this by inserting memberIdentifier as second parameter of crossValue functions.

crossValue('CUBE_CRAFT_COUNT_HOURS.CRAFT_COUNT_HOURS_',
           memberIdentifier(),
           'M_HOURS');

Observe bellow the differences between indicators without and with memberIdentifier. Notice also return value of the function.

It is obvious that function will also automatically handle drill-down paths.

Cross Reference with Filter

BellaDati also does not take in consideration filters applied throught view settings. Therefore, you need to explicitelly tell BellaDati in formula definition which filters and how do you want to use them.

filter("L_PASS_RESULT in ('" + memberValue() + "') AND L_PASS_SUBJECT in ('Math')"){  
	crossValue('CUBE_RESULTS.RESULTS', 'L_STUDENT_COUNT')
}

You can find more about filters and their combinations in Filtering in Formulas.

Next Steps

  • No labels