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.
Best,
William
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:
If BY cand do everything that ADD does, is there any advantadge using the second one? performance maybe?
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!