Hello, I have 3 text-type metrics with the same dimensions, and I would like to combine these 3 metrics into a single text-type metric. In this new metric, I would like to add a category dimension to be assigned to each of the values from the original metrics. Please let me know if I'm not clear enough!! Thank you for your help :)
A basic example below :
Page 1 / 1
Hi @Antoine-2 ,
To combine the three metrics, you would need to create a new metric with an additional dimension Category.
The Merge text formula will collect the text from each metric and attribute it to the corresponding Category item:
Metric 1, Metric 2 and Metric 3 represent the text input metric.
iBY: Category.”Metric x] is attributing each metric to the corresponding item within the Category dimension.
& operator is used to concatenate the text from each metric (there is no concatenation applied since each source metric is attributed to a different item. But our metrics have a text data type so this is the correct operator to use in order to merge.
Hope this helps, Issam
Hi @Issam Moalla ,
Thank you, this is exactly what I was looking for. This leads me to another question, somewhat similar. If I wanted to do exactly the same thing but instead of text metrics, these were dimension metrics. What would be the equivalent of "&" for concatenation ?
Thank you for your help :)
Hi @Antoine-2 ,
A possible way to apply this is by Applying the same logic but referring the unique text property in the Target metric:
'Metric 1 (D)'.NameNBY: Category."Metric 1"]
and using the Item function in your formula to convert back to the dimension of your metric:
Metric 1, 2 and 3 have a data type dimension ID100
Metric x.Name: is giving as an output the Name property of ID100 dimension which is a text
Apply the same logic to allocate each metric to the corresponding item and concatenate the metrics
Item function is converting the text back to a dimension based on the unique property.
However, keep in mind that each source metric (Metric 1, 2 and 3) must have the same dimension and the text property that you are using must be the unique property.
Hope this answers your request, Issam
Hi @Issam Moalla ,
Thank you for your previous responses. I still have the same case, except that this time I want to do it for a "Boolean" type metric. However, when I try to apply the same concatenation logic with "&", it turns the boolean into text. Do you have any solutions to suggest on this matter?
Thank you in advance for your help.
Have a good day
Hi @Antoine-2 ,
When it comes to the booleans, you need to apply logical operators: AND/ORand your target metric needs to have a boolean data type. Since you are looking to merge them by adding each metric to a category the OR would be the correct operator where at least one condition is met.