FOR PreviousPeriod

The FOR PreviousPeriod function is similar to FOR Previous functions unless the adaptable functions adapt to the context of the report by hand. Even though the metric is defined as FOR PreviousPeriod(Quarter), for example, the function returns values from the previous month, as month is the most granular date attribute in this report.

Syntax

SELECT … FOR PreviousPeriod(…,…)
SELECT metric FOR PreviousPeriod(time_attribute)

Examples

SELECT Payment FOR PreviousPeriod(Quarter)
SELECT Payment FOR PreviousPeriod(Quarter, 2)

For differences between FOR Previous and FOR PreviousPeriod see Functions For Referring to Past Time Periods

Powered by Atlassian Confluence and Scroll Viewport.