Dimensionality Hints

Prev Next

The formula bar provides Dimensionality Hints that help you understand automatic adjustments that Pigment has made on your formulas. In some cases it warns about missing or unnecessary Dimensions, so that you can take appropriate action. In other cases it helps users’ understanding by providing context.

Find the Dimensionality Hints

Dimensionality Hints are available when the symbol next to the formula bar comprising an f turns yellow or a light bulb appears. See the example below.

When the f turns yellow, action needs to be taken

If your formula’s output requires Dimensions that were not specified in the Metric’s structure, the f indicator turns yellow. For example, if the formula in your Metric references data that is by Month and Product and your Metric’s structure is set to only Product, the indicator turns yellow.

It could also turn yellow if the formula’s output is only Product but your Metric has both the Month and Product Dimensions in its structure.

Select the hint. An Automatic Formula Dimensions Adjustment pop-up opens giving information on whether Dimensions need to be added or removed.

When Adding a Dimension

Sometimes your Metrics have Dimensions used in their structure that are not part of the output of the formula.

For example, if your formula’s output has Month and Country as Dimensions but your Metric’s structure is Month, Country, and Product, the Product Dimension is automatically added to the formula’s output to match the Metric’s structure.

This is done by using the same behavior as [ADD Constant: Dimension] modifier which essentially adds the Dimension and adds the values consistently across them.

In the example above, you'd see a Metric with Country and Month at the top. The Metric below has a structure of Country, Month, and Product. The Country, Month and Product Metric’s formula references the first Metric and therefore the formula’s output is by Country and Month.

Because Products was not included in the output of the formula, Pigment added it automatically. After adding the Product Dimension, it uses the Constant allocation method, meaning that the value is applied consistently across all products.

For example, look at the Country and Month Metric and find the cell for the United States in Jan 24. The value is 5. In the Country, Month and Product Metric, you can see that same value of 5 was added to each of the different products consistently.

ℹ️ Note

When adding a formula that does not have any Dimensions, such as TRUE or BLANK, the hints appear because the engine has added the Dimensions of the Metric to account for all cells.

When Removing a Dimension

A Dimension is removed when that Dimension isn’t part of the Metric structure but is referenced or included in the formula.

For example, if your formula’s output has Month and Country as Dimensions, but your Metric’s structure is just Country. The Month Dimension is automatically removed and the totals reflect that the Dimension was removed.

This is done by using the same behavior as [REMOVE SUM: Month] which removes the Dimension and sums the value from that Dimension.

In this example, you can see the Metric on the bottom has the Country and Month Dimensions as its structure. This is our source Metric, as it is referenced by the two Metrics above. The two different Metrics above have one by Country and another by Month. Both Metrics at the top have the same formula referencing the Country and Month Metric, therefore there is a discrepancy between formula output and structure.

The pop-up shows the following for the Country Metric:

“Automatic adjustments were made because the formula output structure is different from the Metric structure. 1 dimension was removed- Month”

The pop-up shows the following for the Month Metric:

“Automatic adjustments were made because the formula output structure is different from the Metric structure. 1 dimension was removed- Country”

In both of these examples, the data from the removed Dimensions is summed and that value is provided. You can see for the Months Metric, it’s taking the total or summed value for each month, highlighted in green. In the Country Metric, its taking the summed value across every month, highlighted in red.

You can adjust the Dimensions of all of these formula outputs by using Modifiers.

Explanatory hints

Dimension changes caused by BY

It is not always easy to understand which Dimensions will appear in the output after a BY modifier transformation. The Dimensionality Indicator light bulb appears when the Dimensions resulting from the transformation are different from the Metric’s Dimensions.

When you hover your pointer over the indicator, a pop-up opens showing all the hints for your formula. Select Dimensions changes with BY modifier to open details of any Dimensions that were automatically added or removed.

ℹ️ Note

If the Dimensions resulting from the transformation are the same as the Metric's Dimensions, no hint is displayed.

If no aggregation or allocation operator is specified in a formula featuring the BY modifier, the Dimensionality Indicator light bulb also appears. The hint explains which default operator (SUM or CONSTANT) was automatically added by Pigment.

Dimension alignment in IF expressions

For formulas using an IF expression, which have the “Value if true” argument specified, but the “Value if false or BLANK” argument not specified, the Dimensionality Indicator light bulb appears whenever the “Logical Test” argument uses Dimensions that are different from those involved in the “Value if true” argument.

The hints explain the output of the IF statement, when:

  • The “Value if true” argument is a subset of the Logical Test.

  • One argument’s Dimensions are neither a subset nor a superset of the other.

  • The Logical Test involves Dimensions and “Value if true” Dimensions have an empty intersection.

Where Pigment addresses a Dimension difference, the hints:

  • Explain which Dimensions were added for each argument.

  • List all the Dimensions of the IF expression’s output as a whole.

Learn more

🎓 Pigment Academy

To learn more about using the Dimension Alignment Indicator and Source to Target Mapping, visit our Academy courses on Work with Dimensionality in Formulas and the Interactive Source to Target Mapping Tool.