You can display the top/bottom member value as KPIs by using BellaDati formulas.
It is recommended to get familiar with membersSum and memberValue function before proceeding with this tutorial.
Example:
If you want to display the name of the top city according to number of units sold, here is code you could use. Here we use membersSum to loop through each city for the total units.
top = ''; topUnit = 0; membersSum('[L_CITIES]') { if (M_UNIT>topUnit){ topUnit = M_UNIT top = memberValue() } } return top;
You can also write the formula in this way:
top = ''; topUnit = 0; membersSum('[L_CITIES]') { topUnit = M_UNIT } membersSum('[L_CITIES]') { if (M_UNIT > topUnit){ topUnit = M_UNIT top = memberValue() } } return top;
If you want to display the bottom city with least total units. Here it is:
bottom = '' bottomUnit = 0 membersSum('[L_CITIES]') { bottomUnit = M_UNIT } membersSum('[L_CITIES]') { if (M_UNIT < bottomUnit){ bottomUnit = M_UNIT bottom = memberValue() } } return bottom;
Here is how the result will look like in the view:
Next Steps
Overview
Content Tools