• 31 July 2023
  • 3 replies

Userlevel 2
Badge +1
  • Budding Pigmenteer
  • 5 replies

Hi Guys, 

I have a beginner’s question. I am not entirely sure I understand the difference between BY and ADD. 

I understand both can be used to split the data into additional dimensions but not sure when I should use which. For example - I have data by Period and Account. For the purpose of dimensions alignment with other metrics, I need to add Channel and Country assuming the same values for Channel and Country per Period and Account. I know I can use BY or BY CONSTANT but what if I use ADD? What would be the difference? 




Best answer by WILLIAM.MONTERO 2 August 2023, 09:41

View original

3 replies

Userlevel 2
Badge +1

Hello Adam,

My name is William and I’m a Pigment Support Specialist. I’m hoping I can help you understand the difference between the ADD and BY modifiers.

The ADD modifier allows you to add a dimension and distribute your data based upon the selected allocation method (Split/Constant). This is useful when your source has less dimensions than your destination. 

The BY modifier is more versatile. It will allow you to both allocate and aggregate. Another interesting capability of the BY modifier is replacing a dimension via a mapping attribute, simultaneously adding and removing a dimension. There are several aggregation methods that can be used with the BY modifier in addition to the allocation methods of Split and Constant.

In some conditions you may see similar results between using the ADD and BY modifier. However, the BY modifier can be applied in more situations and achieve results impossible with the ADD modifier.

Lets keep this thread going if you have additional questions on how to apply the ADD and BY modifiers.




This article describes the different modifiers and provided examples of when it may be appropriate to use each one:


This article covers the specifics of using the ADD modifier:


This article covers the specifics of using the BY modifier: 


Badge +3

If BY cand do everything that ADD does, is there any advantadge using the second one? performance maybe?

Userlevel 7
Badge +14

Hi @michelf 

There is no difference in using both in terms of performance - I think it comes down to legibility. If you think one or the other is better to understand how a formula is structured, you can use one or the other.

Hope this helps!