Time transformations are used in metrics to compare values across different time periods, such as the current year versus the previous year, or the current date versus year-to-date/quarter-to-date/month-to-date totals. It is important to note that when comparing the current year to the previous year, data can exist at different levels: yearly (2023 vs. 2022), quarterly (Q1 2023 vs. Q1 2022), monthly (Jan 2023 vs. Jan 2022), or daily (01.01.2023 vs. 01.01.2022). These comparisons are described by different attributes.
Previous year transformation (POPRZEDNI_ROK transformation)
For the previous year transformation, a key component is a table that maps the ID of a given year to the ID of its corresponding previous year. Such tables are commonly referred to in databases as LU (lookup) tables.
The above-mentioned table, specifically the column ROK_ID (YEAR_ID), must be mapped to the Year attribute.
The next step is to create a new transformation in: Project\SchemaObjects\Transformations.
To create a report that displays the value of a selected metric for the current and the previous year, you need to define a new metric. In its formula, include the transformation that was created earlier.
An example report will look like this:
YTD Transformation – the current date compared to the year-to-date total.
In this transformation, the relevant components will look as follows:
We use cookies to optimize our website and our services.
Functional
Always active
Storage or technical access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or solely for the purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
Technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
Technical storage or access that is used exclusively for statistical purposes.Technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet service provider, or additional records from a third party, information stored or retrieved solely for this purpose usually cannot be used to identify you.
Marketing
Technical storage or access is required to create user profiles to send advertisements or to track the user across websites or multiple websites for similar marketing purposes.