Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Removed translated content for 'cs'
Sv translation
languageen

You can display the top/bottom member value as KPIs by using BellaDati formulas.

Note

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.

Code Block
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:

Code Block
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:

Code Block
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

List siblings

Sv translation
languageja

BellaDatiの数式を使用して、上位/下位メンバー値をKPIとして表示できます。

Note

このチュートリアルに進む前に、memberSum関数とmemberValue関数を十分参照することをお勧めします。

例:
販売されたユニット数に応じて上位の都市の名前を表示したい場合は、使用できるコードを以下に示します。ここでは、membersSumを使用して、ユニットごとに各都市をループします。

Code Block
top = '';
topUnit = 0;

membersSum('[L_CITIES]') {
  if (M_UNIT>topUnit){
    topUnit = M_UNIT
    top = memberValue()
  }
}

return top;

以下のように数式を書くこともできます:

Code Block
top = '';
topUnit = 0;

membersSum('[L_CITIES]') {
  topUnit = M_UNIT
}

membersSum('[L_CITIES]') {
  if (M_UNIT > topUnit){
    topUnit = M_UNIT
    top = memberValue()
  }
}

return top;

最少合計数で最下位の都市を表示したい場合は、以下のようにできます:

Code Block
bottom = ''
bottomUnit = 0

membersSum('[L_CITIES]') {
  bottomUnit = M_UNIT
}

membersSum('[L_CITIES]') {
  if (M_UNIT < bottomUnit){
    bottomUnit = M_UNIT
    bottom = memberValue()
  }
}

return bottom;

ビューでは以下のような結果になります:

次に

List siblings

Sv translation
languagede

Sie können den oberen/unteren Elementwert als KPIs anzeigen, indem Sie BellaDati-Formeln verwenden.

Note
Sie können den oberen/unteren Elementwert als KPIs anzeigen, indem Sie BellaDati-Formeln verwenden.

Wenn Sie den Namen der Top-Stadt nach Anzahl der verkauften Einheiten anzeigen möchten, finden Sie hier einen Code, den Sie verwenden können. Hier verwenden wir membersSum, um jede Stadt für die Gesamteinheiten zu durchlaufen.

Code Block
top = '';
topUnit = 0;

membersSum('[L_CITIES]') {
  if (M_UNIT>topUnit){
    topUnit = M_UNIT
    top = memberValue()
  }
}

return top;

Sie können die Formel auch auf diese Weise schreiben:

Code Block
top = '';
topUnit = 0;

membersSum('[L_CITIES]') {
  topUnit = M_UNIT
}

membersSum('[L_CITIES]') {
  if (M_UNIT > topUnit){
    topUnit = M_UNIT
    top = memberValue()
  }
}

return top;

Wenn Sie die untere Stadt mit den niedrigsten Gesamteinheiten anzeigen möchten. Hier ist es:

Code Block
bottom = ''
bottomUnit = 0

membersSum('[L_CITIES]') {
  bottomUnit = M_UNIT
}

membersSum('[L_CITIES]') {
  if (M_UNIT < bottomUnit){
    bottomUnit = M_UNIT
    bottom = memberValue()
  }
}

return bottom;

Hier ist, wie das Ergebnis in dem View aussehen wird:

Nächste Schritte

List siblings