Skip to main content

Applying dimension limits

Dimension limits is defined in the qOtherTotalSpec object and specifies if some values, grouped as Others, should be grouped together in the visualization. This limits the number of displayed values and when such limitation is set, the only dimensions displayed are those where the measure value meets the limitation criterion.

  • Fixed number: Select to display the top or bottom values. Set the number of values. You can also use an expression to set the number.

  • Exact value: Use the operators and set the exact limit value. You can also use an expression to set the number.

  • Relative value: Use the operators and set the relative limit value in percent. You can also use an expression to set the number.

The qOtherTotalSpec object

Dimension limits are set in the qOtherTotalSpec object. The object resides inside the dimension definition which means that each dimension of a hypercube is configured separately.

"qOtherTotalSpec": { "qOtherMode": "OTHER_COUNTED", "qOtherCounted": { "qv": "6" }, "qOtherLimit": { "qv": "0" }, "qOtherLimitMode": "OTHER_GE_LIMIT", "qOtherSortMode": "OTHER_SORT_DESCENDING", "qTotalMode": "TOTAL_OFF" }
Example: qOtherTotalSpec formatted to limit on the top 6 values (including others) of the first measure

Fixed number limitations

These examples helps you set numbers to display the top or bottom values. You can also use an expression to set the number.

Example: fixed number, top 3, no others

In this example we want to display only the top three results based on the first measure. So we set "qOtherMode": "OTHER_COUNTED" and we then define "qOtherCounted": {"qv": "3"}. We do not want to show an others value, so we set "qSuppressOther": true.

Note: If qSuppressOther is not defined, the last value in the visualization (colored gray), summarizes all the remaining values and the value counts as 1 in that setting. In this example, the third value would be Others.

Since we want to show the top (highest) three values we set "qOtherSortMode": "OTHER_SORT_DESCENDING" to sort the values in descending order.

"qOtherTotalSpec": { "qOtherMode": "OTHER_COUNTED", "qOtherCounted": { "qv": "3" }, "qSuppressOther": true, "qOtherSortMode": "OTHER_SORT_DESCENDING" }

Example: fixed number, top 3, show others labeled "Other venues"

The below examples are variants of the above example, where one example include others and another example shows the bottom three values.

The label for others are set in the othersLabel property inside the NxInlineDimensionDef (qDef). In the qOtherTotalSpec object, set "qSuppressOther": false, or omit it completely.

{ "qDef": { "qFieldDefs": [ "City" ], "othersLabel": "Other venues" }, "qOtherTotalSpec": { "qOtherMode": "OTHER_COUNTED", "qOtherCounted": { "qv": "3" }, "qOtherSortMode": "OTHER_SORT_DESCENDING" } }

Example: fixed number, bottom 3, no others

This example is a variant of the above example, where we show the bottom three with no others.

Set "qOtherSortMode": "OTHER_SORT_ASCENDING" to change the sort order and show the bottom three results.

"qOtherTotalSpec": { "qOtherMode": "OTHER_COUNTED", "qOtherCounted": { "qv": "3" }, "qSuppressOther": true, "qOtherSortMode": "OTHER_SORT_ASCENDING" }

Exact value limitations

These examples helps you use the operators and set exact limit values. You can also use an expression to set the number.

Example: exact value set to above or equal to 40000, no others

In this example we want to display all venues with an attendance average higher than or equal to 40,000.

We set "qOtherMode": "OTHER_ABS_LIMITED" to limit the dimension values to an absolute value. We then define the actual value "qOtherLimit": {"qv": "40000"}. We set "qOtherLimitMode": "OTHER_GE_LIMIT" to include the values greater than or equal to what we defined in qOtherLimit.

We do not want to show an others value, so we set "qSuppressOther": true.

Note: If qSuppressOther is not defined, the last value in the visualization (colored gray), summarizes all the remaining values.
"qOtherTotalSpec": { "qOtherMode": "OTHER_ABS_LIMITED", "qOtherLimit": { "qv": "40000" }, "qOtherLimitMode": "OTHER_GE_LIMIT", "qSuppressOther": true }

Example: exact value set to less than 40000, no others

This example is a variant of the above example, where we display the venues with an attendance average less than 40,000.

Set "qOtherLimitMode": "OTHER_LT_LIMIT" to include the values less than what was defined in qOtherCounted.

"qOtherTotalSpec": { "qOtherMode": "OTHER_ABS_LIMITED", "qOtherLimit": { "qv": "40000" }, "qOtherLimitMode": "OTHER_LT_LIMIT", "qSuppressOther": true }

Relative value examples

These examples helps you use the operators and set relative limit values. You can also use an expression to set the number.

Example: relative value set to greater than or equal to 12%, no others

In this example we want to display all venues with an attendance average higher than or equal to 12 per cent of the total.

We set "qOtherMode": "OTHER_REL_LIMITED" to limit the dimension values to an relative value. We then define the actual value "qOtherCounted": {"qv": "12%"}. We set "qOtherLimitMode": "OTHER_GE_LIMIT" to include the values greater than or equal to what we defined in qOtherCounted.

We do not want to show an others value, so we set "qSuppressOther": true.

"qOtherTotalSpec": { "qOtherMode": "OTHER_REL_LIMITED", "qOtherLimit": { "qv": "12%" }, "qOtherLimitMode": "OTHER_GE_LIMIT", "qSuppressOther": true, "qOtherSortMode": "OTHER_SORT_DESCENDING" }

Example: relative value set to less than 11%, no others

In this example we want to display all venues with an attendance average less than 11 per cent of the total.

We set "qOtherMode": "OTHER_REL_LIMITED" to limit the dimension values to an relative value. We then define the actual value "qOtherCounted": {"qv": "11%"}. We set "qOtherLimitMode": "OTHER_LT_LIMIT" to include the values lower than what we defined in qOtherCounted.

We do not want to show an others value, so we set "qSuppressOther": true.

"qOtherTotalSpec": { "qOtherMode": "OTHER_REL_LIMITED", "qOtherLimit": { "qv": "11%" }, "qOtherLimitMode": "OTHER_LT_LIMIT", "qSuppressOther": true "qOtherSortMode": "OTHER_SORT_DESCENDING" }