In this article, we cover the four main relationships between Dimensions so that you become a master of aggregating and allocating data in your formulas.
Overview
Let's start with an overview:
Relationship between Metrics’ Dimensions | Modification type | Dimension modifier | Aggregation / allocation methods |
N->1 | Aggregation |
|
|
N->none | Aggregation |
|
|
1->N | Allocation |
|
|
none->N | Allocation |
|
|
Let's deep dive into each use case with an example: let's say you want to know your business's Revenue per Region, per Country or per Product and you want to calculate one based on the others.
In this case, we consider three Dimension Lists:
.png?sv=2022-11-02&spr=https&st=2025-11-25T12%3A17%3A42Z&se=2025-11-25T12%3A31%3A42Z&sr=c&sp=r&sig=rVQOrMiiIFYpP2e%2FGwdFFp%2Bkc2Q1t8oQ1s9RZlvUWsQ%3D)
Case 1: Aggregation with an N->1 relationship between Metrics’ Dimensions
There is an N->1 relationship when you want to match a Metric’s Dimension (N) (e.g Country) with a higher level (1) (e.g. Region).
In this case, you can aggregate data with the BY SUM, BY MIN, BY MAX and similar Dimension modifiers. They work like SUMIFS(), MINIFS(), MAXIFS() functions in Excel.
Illustrative example:
Let's say you already know the Revenue per Country and you want to determine the Revenue per Region.
.png?sv=2022-11-02&spr=https&st=2025-11-25T12%3A17%3A42Z&se=2025-11-25T12%3A31%3A42Z&sr=c&sp=r&sig=rVQOrMiiIFYpP2e%2FGwdFFp%2Bkc2Q1t8oQ1s9RZlvUWsQ%3D)
There are multiple rows of Revenue per Country (N) you want to sum together for each Revenue per Region (1).
.png?sv=2022-11-02&spr=https&st=2025-11-25T12%3A17%3A42Z&se=2025-11-25T12%3A31%3A42Z&sr=c&sp=r&sig=rVQOrMiiIFYpP2e%2FGwdFFp%2Bkc2Q1t8oQ1s9RZlvUWsQ%3D)
Now, let's carefully review the formula:
'Revenue per country'[BY SUM: Country.Region]
You refer to your initial Metric :
'Revenue per Country'Then use the
BY SUMDimension modifier toSUMvalues when aggregating dataThen specify the Dimension you want to aggregate on :
RegionAnd explicitly tell Pigment how to map a
Countryto aRegion, by referring toRegionas a Property of the DimensionCountry:Country.Region
Case 2: Aggregation with an N->None relationship between Metrics’ Dimensions
There is an N->None relationship when you want to remove a Dimension (e.g. Product) in the Metric you are aggregating (e.g. Revenue per Country and per Product).
In this case, you need to :
REMOVEthe corresponding Dimension.specify how to aggregate the data (e.g.
SUM,MIN,MAX,COUNTetc.) with theBYDimension modifier so that it fits with the remaining Dimensions.
Illustrative example:
Let's say you already know the Revenue per Country, per Product and you want to determine the Revenue per Country.
.png?sv=2022-11-02&spr=https&st=2025-11-25T12%3A17%3A42Z&se=2025-11-25T12%3A31%3A42Z&sr=c&sp=r&sig=rVQOrMiiIFYpP2e%2FGwdFFp%2Bkc2Q1t8oQ1s9RZlvUWsQ%3D)
Multiple rows of Revenue per Product (N) should be grouped into each corresponding Revenue per Country (without Product).
.png?sv=2022-11-02&spr=https&st=2025-11-25T12%3A17%3A42Z&se=2025-11-25T12%3A31%3A42Z&sr=c&sp=r&sig=rVQOrMiiIFYpP2e%2FGwdFFp%2Bkc2Q1t8oQ1s9RZlvUWsQ%3D)
Now, let's carefully review the formula:
'Revenue per Country, per Product'[REMOVE SUM: Product]
You refer to your initial Metric: '
Revenue per Country, per Product'Then use
REMOVE SUMDimension modifier toREMOVEa Dimension and sum the remaining valuesSpecify the Dimension you want to remove :
Product
Case 3: Allocation with a 1->N relationship between Metrics Dimensions
There is a 1->N relationship when you want to allocate values from a Metric (e.g. Revenue per Region) to a Metric at a more granular level (e.g. Revenue per Country).
In this case, the BY Dimension modifier tells Pigment upon which Dimension you want to allocate values. You also need to specify how you want to allocate data :
you can allocate the same value across all items with
BY CONSTANT(e.g. the Region Revenue is copied for each underlying Country).you can
SPLITthe value based on the number of items withBY SPLIT(e.g. the Region Revenue is equally distributed for underlying Countries).
Illustrative example:
Let's say you already know the Revenue per Region and you want a rough estimate of the Revenue per Country.
.png?sv=2022-11-02&spr=https&st=2025-11-25T12%3A17%3A42Z&se=2025-11-25T12%3A31%3A42Z&sr=c&sp=r&sig=rVQOrMiiIFYpP2e%2FGwdFFp%2Bkc2Q1t8oQ1s9RZlvUWsQ%3D)
One row of Revenue per Region (1) feeds several rows of Revenue per Country (N).
.png?sv=2022-11-02&spr=https&st=2025-11-25T12%3A17%3A42Z&se=2025-11-25T12%3A31%3A42Z&sr=c&sp=r&sig=rVQOrMiiIFYpP2e%2FGwdFFp%2Bkc2Q1t8oQ1s9RZlvUWsQ%3D)
Each Revenue per Region (1) can also be SPLIT based on the number of Countries per Region.
Now, let's carefully review the formula :
'Revenue per Region'[BY SPLIT: Country.Region]
You refer to your initial Metric :
'Revenue per Region'Then use the
BY SPLITDimension modifier to allocate values based on the number of countries per regionThen specify the Dimension you want to allocate to :
CountryAnd explicitly tell Pigment how to map a
Countryto aRegion, by referring toRegionas a Property of the DimensionCountry:Country.Region
Case 4: Allocation with a none->N relationship between Metrics Dimensions
There is a none->N relationship when you want to ADD a new Dimension (e.g Product) to a Metric (e.g. Revenue per Country).
In this case, you need to:
ADDthe corresponding Dimensionspecify how to allocate the data to the new Dimension modalities. As with the allocation use case, it works with the
CONSTANTandSPLITallocation methods
Illustrative example:
Let's say you already know the Revenue per Country and you want a rough estimate of the Revenue per Country, per Product.
.png?sv=2022-11-02&spr=https&st=2025-11-25T12%3A17%3A42Z&se=2025-11-25T12%3A31%3A42Z&sr=c&sp=r&sig=rVQOrMiiIFYpP2e%2FGwdFFp%2Bkc2Q1t8oQ1s9RZlvUWsQ%3D)
One row of Revenue per Country (1) feeds several rows of Revenue per Country, per Product (N). The revenue for each country is split based on the number of products.
.png?sv=2022-11-02&spr=https&st=2025-11-25T12%3A17%3A42Z&se=2025-11-25T12%3A31%3A42Z&sr=c&sp=r&sig=rVQOrMiiIFYpP2e%2FGwdFFp%2Bkc2Q1t8oQ1s9RZlvUWsQ%3D)
Now, let's carefully review the formula:
'Revenue per Country'[ADD SPLIT: Product]
You refer to your initial Metric:
'Revenue per Country'Then use the
ADD SPLITDimension modifier to allocate values based on the number of productsThen specify the Dimension you want to allocate to:
Product