qoq
< Back to Reference | View source
qoq()
Current full period quarter over previous full period quarter
Usage
qoq(
.data,
.date,
.value,
calendar_type = "standard",
lag_n = 1,
fiscal_year_start = 1
)Arguments
| Argument | Description |
|---|---|
.data |
tibble or dbi object (either grouped or ungrouped) |
.date |
the date column to group by |
.value |
the value column to summarize |
calendar_type |
select either ‘standard’, ‘445’, ‘454’, or ‘544’ calendar, see ‘Details’ for additional information |
lag_n |
the number of periods to lag |
fiscal_year_start |
integer 1-12, the month the fiscal year starts nearest to (default 1 = January). Only used with retail calendars (‘445’, ‘454’, ‘544’). |
Value
ti object
Description
This calculates the full quarter value compared to the previous quarter value respecting any groups that are passed through with
dplyr::group_by()Use calculate to return the results
Examples
qoq(contoso::sales,.date=order_date,.value=quantity,calendar_type='standard',lag_n=1)See also
Other time_intelligence: atd(), dod(), mom(), momtd(), mtd(), mtdopm(), pmtd(), pqtd(), pwtd(), pytd(), qoqtd(), qtd(), qtdopq(), wow(), wowtd(), wtd(), wtdopw(), yoy(), yoytd(), ytd(), ytdopy()