To complete this recipe, do the following:
- Create the following measures:
K Value = SELECTEDVALUE('R10_K'[K], 6)
k Value 2 = SELECTEDVALUE('R10__k'[k], 1)
N Value = SELECTEDVALUE('R10_N'[N], 1)
n Value 2 = SELECTEDVALUE('R10__n'[n], 1)
Probability =
VAR __Error =
IF(ISBLANK([K Value]) ||
ISBLANK([k Value 2]) ||
ISBLANK([N Value]) ||
ISBLANK([n Value 2]) ||
[n Value 2]<[k Value 2] ||
[K Value]<[k Value 2] ||
[N Value]<[n Value 2] ||
[N Value]<[K Value],
TRUE(),
FALSE()
)
VAR __Numerator =
IF(
ISERROR(
COMBIN([K Value],[k Value 2]) *
COMBIN([N Value]-[K Value],[n Value 2]-[k Value 2])
),
-1,
COMBIN([K Value],[k Value 2]) *
COMBIN([N Value]-[K Value],[n Value 2]-[k Value 2])
)
VAR __Denominator =
IF(
ISERROR(COMBIN([N Value],[n Value 2])),
-1,
COMBIN([N Value],[n Value 2])
)
RETURN
IF(
__Error || __Denominator = -1 || __Numerator = -1,
"Bad Parameters",
DIVIDE(__Numerator,__Denominator,0)
)
- On a Report page, create a Slicer visualization, place the K column from the R10_K table into the Field area of the visualization, and format the slicer as a List.
- On the same Report page, create a second Slicer visualization, place the k column from the R10__k table into the Field area of the visualization, and format the slicer as a List.
- On the same Report page, create a third Slicer visualization, place the N column from the R10_N table into the Field area of the visualization, and format the slicer as a List.
- On the same Report page, create a fourth Slicer visualization, place the n column from the R10__n table into the Field area of the visualization, and format the slicer as a List.
- On the same Report page, create a Card visualization and place the Probability measure into the Field area of the visualization.