Transformations
Last updated
Was this helpful?
Last updated
Was this helpful?
Transformations process the result of the inner sources
before it is passed to the or to the next transformation.
to-list
join
to-percentages
This calculates the representation of each value in the complete dataset. Only one sources
is accepted.
You usually want to use the format: percentage
option of the associated data visualisation to automatically change the labels and tooltips and formats to display percentage% (count)
ratio
This calculates the ratio between two numbers (source 1 / source 2 * 100)
. It only accepts two sources
that should each return numbers.
index
For example, if 10% of the users in a segment viewed content associated with tag 1, while 5% of the users in the whole datamart viewed content associated with this same tag, the index of tag 1 in segment in comparison to the whole datamart is 10 / 5 * 100 = 200
.
This is typically used to see which values are more/less represented in the first data source compared to the second one. An index above 100 means the value is more represented in the first data source than in the second, a value under 100 means the value is less represented in the first data source than in the second.
This is usually represented in a Bars
chart with a plot_line_value
of 100 and an index
format :
For each value in the first dataset, it automatically calculates its percentage representation in the first and the second source, then does the formula source value (in percentages) / comparison value (in percentages) * 100
.
format-dates
Use this transformation to allow the display of friendly dates to the user or to allow joining multiple data sources into the same dataset by putting returning dates in the same format.
Dates must be in the 2021-11-05T00:00:00.000Z
format or in timestamp to be formatted.
Typical compatible queries are :
reduce
avg
calculates the average of values
count
calculates the number of values
first
returns the first value
last
returns the last value
max
returns the maximum value
min
returns the minimum value
sum
returns the sum of all values
get-decorators
This transforms identifiers such as channel IDs, compartment IDs and segment IDs into the corresponding channel names, compartment names and segment names.
This puts multiple numbers from multiple queries into a . It is important to set the key of each number with the series_title
property. It takes from one to any number of sources
.
This joins two into a dataset. It is important to set the name of each series with the series_title
property. It takes from one to any number of sources
.
This calculates the representation of values from a in comparison to an other .
This formats timestamps and date fields to the specified date format. Available date formats are .
returning timestamps or @date_histogram.
queries returning the date_time dimension
queries returning the date_time dimension.
This transforms a key / value or key / values dataset into a single number to be displayed in .