Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Sv translation
languageen
Note

It is recommended to get familiar with rank() function before proceeding with this tutorial.

For this tutorial, we will leverage Data Set loaded with exam scores.
Data set includes two columns:

  • Student ID
  • Student Score
ilupng
data

Percentiles

Info

Percentile (or centile) is the value of a variable below which a certain percent of observations fall. For example, the 20th percentile is the value (or score) below which 20 percent of the observations may be found.

You desire to create table showing percentile next to score for each student.

  • Create new table with student ID drill-down and Score indicator.
  • Create new indicator - Percentile.
  • Add following formula into Indicators settings.
  • Setup percentage to Unit and associate it with appropriate Format.
Code Block
int records = aggregatePrevLevel(1){L_ID_COUNT}
int rank = rank() {M_SCORE} 
double percentile = 1-(rank/records)
return percentile
  1. line: Store the number of total records (students). Since, student drill-down is used, aggregation one level up is needed.
  2. line: Obtain rank for each record.
  3. line: Recalculate rank to percentile. For example, if rank is 5 from 100 students, the percentile will be: 1-(5/100) = 95%.
ilupng
percentile

Quantiles

Info

A value which divides a set of data into equal proportions. Examples are median, quartile and decile.

You desire to create KPI label showing the median of exam scores.

  • Create new KPI label.
  • Create new indicator - Quantile.
  • Add following formula into Indicators settings.
  • Create quantile variable, to be able to dynamically change observed quantile.
Code Block
int records = L_ID_COUNT
double groups = 100/@quantile
int key = round(records-records/groups)
double median = 0
membersSum('L_ID'){
  rank = rank(){M_SCORE}
  if (rank == key){
  	median = M_SCORE
  }
}

return median
  1. Use first three lines to convert provided quantile variable and find the corresponding position within the set of scores.
  2. Obtain rank for each score, aggregated to the level of student's ID.
  3. If the current rank equals the position, store score to the median variable.
ilupng
quantile

Next Steps

Sv translation
languageja
Note

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

このチュートリアルでは、試験スコアがロードされたデータセットを活用します。

データセットには2つの列が含まれます:

  • 生徒のID
  • 生徒の点数

ilupng
data

パーセンタイル(百分位数)

Info

百分位数は、観測値の特定の割合がそれ以下になる変数の値です。例えば、20番目の百分位数は、観測の20%があたる値(スコア)です。

各生徒のスコアの横に百分位数を示す表を作成する必要があります。

  • 生徒IDドリルダウンと点数インジケータを使用して新しい表を作成します。

  • 新しいインジケータを作成 百分位数
  • 次の式をインジケータ設定に追加します。
  • 単位にパーセンテージを設定し、適切な形式に関連付けます。

Code Block
int records = aggregatePrevLevel(1){L_ID_COUNT}
int rank = rank() {M_SCORE} 
double percentile = 1-(rank/records)
return percentile
  1. : 合計レコード(生徒)数を保存します。生徒のドリルダウンが使用されるため、1レベル上の集計が必要です。
  2. : 各レコードのランクを取得します。
  3. : ランク百分位数に再計算します。例えば、100人の生徒のランクが5の場合、百分位数は: 1-(5/100) = 95%

ilupng
percentile

四分位数

Info

データのセットを等しい割合に分割する値です。例としては、中央値、四分位数、十分位数があります。

試験スコアの中央値を示すKPIラベルを作成する必要があります。

  • 新しいKPIラベルを作成します。
  • 新しいインジケータを作成分位
  • 次の式をインジケータ設定に追加します。
  • 観測された四分位を動的に変更できるように、四分位変数を作成します。
Code Block
int records = L_ID_COUNT
double groups = 100/@quantile
int key = round(records-records/groups)
double median = 0
membersSum('L_ID'){
  rank = rank(){M_SCORE}
  if (rank == key){
  	median = M_SCORE
  }
}

return median
  1. 最初の3行を使用して、提供された四分位数変数を変換し、スコアセット内の対応する位置を見つけます。
  2. 生徒IDのレベルに集計された各スコアのランクを取得します。
  3. 現在のランク位置と等しい場合、点数中央値変数に格納します。

ilupng
quantile

次に

Sv translation
languagede
Note

Es wird empfohlen, sich mit der rank()-Funktion vertraut zu machen, bevor Sie mit diesem Tutorial fortfahren.

Für dieses Tutorial werden wir den Datensatz verwenden, der mit den Untersuchungsergebnissen geladen ist.
Der Dataset enthält zwei Spalten:

  • Student ID
  • Student Score

ilupng
data

Perzentile

Info

Percentile (oder Centile) ist der Wert einer Variablen, unter dem ein bestimmter Prozentsatz der Beobachtungen liegt. Zum Beispiel ist das 20. Perzentil der Wert (oder die Punktzahl), unterhalb dessen 20 Prozent der Beobachtungen liegen.

Du möchtest eine Tabelle erstellen, die das Perzentil neben der Punktzahl für jeden Schüler anzeigt.

  • Legen Sie eine neue Tabelle mit Drill-Down des Studenten ID und Scorekennzeichen an.
  • Neuen Indikator anlegen - Perzentil.
  • Fügen Sie die folgende Formel in die Einstellungen der Indikatoren ein.
  • Stellen Sie den Prozentsatz auf Einheit ein und ordnen Sie ihn dem entsprechenden Format zu.
Code Block
int records = aggregatePrevLevel(1){L_ID_COUNT}
int rank = rank() {M_SCORE} 
double percentile = 1-(rank/records)
return percentile
  1. Linie: Speichern Sie die Anzahl der Gesamtdatensätze (Studenten). Da das Studenten Drill-Down verwendet wird, ist eine Aggregation eine Stufe höher erforderlich.
  2. Linie: Erhalten Sie einen Rang für jeden Datensatz.
  3. Linie: Berechnen Sie den Rang auf Perzentil neu. Wenn beispielsweise der Rang 5 von 100 Studenten beträgt, wird das Perzentil verwendet: 1-(5/100) = 95%.

ilupng
Perzentil

Quantile

Info

Ein Wert, der einen Datensatz zu gleichen Teilen aufteilt. Beispiele sind Median, Quartil und Dezil.

Sie möchten ein KPI-Label erstellen, das den Median der Prüfungsergebnisse anzeigt.

  • Erstellen Sie ein neues KPI-Label.
  • Neuen Indikator anlegen - Quantil.
  • Fügen Sie die folgende Formel in die Einstellungen der Indikatoren ein.
  • Erstellen Sie eine Quantilvariable, um das beobachtete Quantil dynamisch ändern zu können.
Code Block
int records = L_ID_COUNT
double groups = 100/@quantile
int key = round(records-records/groups)
double median = 0
membersSum('L_ID'){
  rank = rank(){M_SCORE}
  if (rank == key){
  	median = M_SCORE
  }
}

return median
  1. Verwenden Sie die ersten drei Linien, um die bereitgestellte Quantilvariable umzuwandeln und die entsprechende Position innerhalb des Ergebnissatzes zu finden.
  2. Erhalten Sie einen Rang für jede Bewertung, aggregiert auf der Ebene der Studenten-ID.
  3. Wenn der aktuelle Rang gleich der Position ist, speichern Sie den Score in der Medianvariablen.

ilupng
Quantil

Nächste Schritte