No Translation available yet
You have Slovak selected as language but this page has not been translated yet. Translate the page or view the content in the default space language below.
Display default
When evaluating formulas, BellaDati proceeds in following fashion:
- Apply Member aggregation function to particular Indicators. (SUM, MIN, MAX, AVG, COUNT)
- Execute user defined Operations among Indicators. (+,-,*,/).
However, sometimes this behavior is not demanded.
Calculating Total Sales
You can leverage memberSum function to force BellaDati to execute defined operation on particular level. Since multiplication of Price and Quantity is needed on every row, use unique key attribute as memberSum parameter.
int sales = 0
membersSum('L_ID'){
int revenue = (M_QUANTITY * M_PRICE)
sales = sales + revenue
}
return sales
Calculating Total Sales For Particular Drill-Down
If you want drill-down path to be considered while applying memberSum function, you have to explicitelly define it in developed formula. Place desired attribute code before unique key definition as shown in the following example. This will ensure that your data are correctly multiplied and subsequently aggregated.
int sales = 0
membersSum('[L_DEPARTMENT][L_ID]'){
int revenue = (M_QUANTITY * M_PRICE)
sales = sales + revenue
}
return sales
You can observe result of the applied formula in the following table. Same settings would apply for char data visualization.
Next Steps