Skip to main content

Suppose if a base metrics has Dimensions Product and Month with Data type Country

We wish to have Target metric with unchanged Dimensions Product and Month but with Data type Region

How can we get to the outcome in Target Metric

Hi Rushi,

Since your ‘Source metric’ is of type = dimension (Country), you can call its properties in a formula like any other dimension.

So assuming that in your Country dimension you have a property ‘Region’ to map countries to their Region, then you can just use this formula in your target metric :

'source metric'.Region

 

Hope this helps!

Best,

 


Hi ​@Benoit ,

 

I missed 1, in the case i am handling, we cant use list property, we need to create a mapping metric

 

How could the formula be in such a case

 

Thanks for the previous help 


Hi,

There are probably other/better solutions, but here are my first thoughts.
 

If the your Countries’ Regions are not something that are supposed to change over time, I suggest you create a Region mapping property in your Country dimension. That is the most scalable solution.

Even better solution would be to have the Region property in your source transaction list, so you can just arrange your data .

 

But if it’s something moving, for teritorry planning for instance, I would recommend creating a ‘Region by Country Month’ mapping metric, dimensioned by Country and Month, data type : dimension (Region).
This creates a direct link between Country and Region over Months that can be used in many other formulas to rearrange your data but also with the mapped dimension feature: 

 

Now, in your Target metric, to transform your Source metric from a Country to Region result, you can use this formula:

'Region by Country Month' by:'source metric'] 
 

 

Please let me know if that is what you were looking for?

Best,


Reply