N Keywords [n] and [wn]
0
0
Edited Aug 31, 2015
Measures:
When used in measures: [n] is the unweighted n-size of the measure and [wn] is the weighted n-size of the measure.
figure 1.0
figure 1.1
figure 1.2
figure 1.3
The n-sizes are filtered by parent groups if any.
figure 1.4
In the following examples (fig 1.5-1.8), the n-sizes are not filtered by the groups because the groups aren't parent groups. "Parent" means a parent in the same axis container (rows container vs. cols container).
figure 1.5
figure 1.6
figure 1.7
figure 1.8
Weighting Axis:
If the Weighting Axis is used
and the measure weights are set to "Inherit from Weighting Axis", the following rules apply:
[wn] will be unavailable if the Weighting Axis is not a parent of the Measures Axis. Since there can be
multiple weights associated with a single measure, RB wouldn't know which weight to apply.
For example:
figure 2.0
Feedback Request: In this configuration the weight to use for [wn] is unknown to the measure. We are considering adding a notation
[wn{notation}] to allow the user to specify which weight to use. Please let us know if you would find the notation helpful. Reply to the corresponding comment at the bottom of this page to provide feedback.
In this example the Weighting Axis is a child rather than a parent of the Measures Axis. So [wn] is still not available to the measures:
figure 2.1
In this example the Weighting Axis is a parent of the Measures Axis, so [n] and [wn] are available to the measures.
figure 2.2
Groups:
In groups, if there are no parent measures, [n] represents the number of respondents in the group. [wn] is not available.
Feedback Request: In this configuration the weight to use for [wn] is unknown to the group. We are considering adding a notation
[wn{notation}] to allow the user to specify which weight to use. Please let us know if you would find the notation helpful. Reply to the corresponding comment at the bottom of this page to provide feedback.
figure 3.0
figure 3.1
figure 3.2
figure 3.3
If nested groups exist, the n-sizes are filtered by parent group(s):
figure 3.4
The keywords [n] and [wn] are treated differently when the group has a parent measure. [n] is not just the number of respondents
in the group. It's the n-size of the measure filtered by the group. And [wn] is the same thing but weighted.
figure 3.5
Var Axis:
[n] and [wn] are
not available if Measures and Vars are in separate containers (rows container vs. columns container). Since the
syntax for Measures and the syntax for Vars can both affect the n-size, the n-size is only known to the data cell in which they intersect.
figure 4.0
Feedback Request: It seems like a real bummer that you can't use [n] in the above scenario. Do you agree? Let us know. Reply to the corresponding comment at the bottom of this page to provide feedback.
If Measures and Vars are both in the same axis container (e.g., both in Rows), [n] and [wn] are available to the innermost axis.
figure 4.1
figure 4.2