To complete this recipe, do the following:
- Create the following measures:
Jarque-Bera =
VAR __Table = 'R08_Table'
VAR __Mean = AVERAGEX(__Table,[Values])
VAR __StdDev = STDEVX.S(__Table,[Values])
VAR __n = COUNTROWS(__Table)
VAR __TableSkew =
ADDCOLUMNS(
__Table,
"__Skew",POWER(([Values]-__Mean),3)
)
VAR __Skewness =
DIVIDE(
SUMX(__TableSkew,[__SKew]),
POWER(__StdDev,3),0
) * DIVIDE(1,__n,0)
VAR __TableKurtosis =
ADDCOLUMNS(
__Table,
"__Kurtosis",POWER(([Values]-__Mean),4)
)
VAR __Kurtosis =
DIVIDE(
SUMX(__TableKurtosis,[__Kurtosis]),
POWER(__StdDev,4),0
) * DIVIDE(1,__n,0)
VAR __FirstPart = DIVIDE(__n,6,0)
VAR __SecondPart =
POWER(__Skewness,2) +
1/4*(POWER(__Kurtosis - 3,2))
RETURN
__FirstPart * __SecondPart
JB Type =
SWITCH(TRUE(),
[Jarque-Bera]>0,"Not Normally Distributed",
"Normally Distributed"
)
- On a Report page, create a Card visualization and place the Jarque-Bera measure into the Fields area of the visualization.
- On the same Report page, create another Card visualization and place the JB Type measure into the Fields area of the visualization.
- On the same Report page, create a Line chart visualization and place the Index column from the R08_Table table into the Axis area and the Values column from the R08_Table table into the Values area of the visualization.