These cookies provide us with information on how our websites are being used, to help us improve the quality and relevance of content we place on them. Additionally, they also allow us to show you embedded videos and remember your preferences and actions, so that the websites do not bother you with the same request repeatedly (e.g. filling a form to download a PDF file and provide feedback about such actions to our affiliated entities).
FOR PreviousPeriod
The FOR PreviousPeriod function is similar to FOR Previous functions unless the adaptable functions adapt to the context of the visualization by hand.
Even though the metric is defined as FOR PreviousPeriod({attribute/quarter}), for example, the function returns values from the previous month, as month is the most granular date attribute in this visualization.
Syntax
SELECT … FOR PreviousPeriod(…,…)
SELECT metric FOR PreviousPeriod(time_attribute)
Examples
SELECT {metric/payment} FOR PreviousPeriod({attribute/quarter})
SELECT {metric/payment} FOR PreviousPeriod({attribute/quarter}, 2)
For differences between FOR Previous and FOR PreviousPeriod, see Functions For Referring to Past Time Periods.