


You can also use the offset argument to specify how many periods apart you want to compute the comparison. If the period argument is left empty, the calculation changes based on the period granularity that is chosen (in the field well) to be displayed in the visual. The granularity of YEAR means year-over-year computation, Quarter means quarter-over-quarter, and so on. You can use the period argument in the function to define the period granularity of the calculation. For example, you can compute a year-over-year increase in sales, or week-over-week percentage revenue changes.Ī typical comparative period function has the syntax periodOverPeriodDifference(measure, date, period, offset), with two optional arguments: period and offset. You can use period over period functions to compare measures at different time periods, such as year, quarter, and month. Comparative (period over period) functions We can divide period functions into two main groups: comparative (period over period) functions and cumulative (period to date) functions. New period functionsīefore we demonstrate use cases, let’s go over the new period function suite and see what new functions we now support. We also discuss several scenarios to extend the usage of the period functions, which will be useful in more advanced situations. In this post, we introduce the new period functions and their capabilities, and demonstrate several typical use cases. This allows authors in QuickSight to implement advanced calculations without having to use complicated date offsets in calculations to achieve such datetime-aware comparisons.
Golang compare durations series#
Amazon QuickSight recently added native support for comparative (e.g., year-over-year) and cumulative (e.g., year-to-date) period functions which allow you to easily introduce these calculations in business reporting, trend analysis and time series analysis.
