When there is a discrepancy in the Dimensions included in your formula and the Metric structure, a warning is displayed to show the adjustments that were made. This article discusses the outcome of the automatic adjustments.
What is the Dimension alignment indicator?
The Dimension alignment indicator feature is the warning icon next to the formula bar that turns yellow when there is a discrepancy between the Dimensions in a formula’s output and those that are in the Metric.
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
, there is a discrepancy.
The same could be set if the formula’s output is only Product
but your Metric has both the Month
and Product
dimensions as the structure. In both cases, the formula’s output dimensions do not match the Metric’s structure.
How does it work?
When a discrepancy is detected, the icon next to your formula bar turns yellow. When hovered over a message appears “Automatic adjustments were made because the formula output structure is different from the Metric structure.” Below that part of the message, there will be more information regarding whether Dimensions need to be added and or removed.
In both cases, the data values are adjusted by either spreading them across added Dimensions or providing totals from removed Dimensions.
It is possible to have instances where some Dimensions need to be added and others 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.
Example of adding a Dimension
In this example, 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 Dimension, such as
TRUE
orBLANK
, the indicator appears because it 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 formula indicator 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 formula indicator 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.
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.