periodToDateMaxOverTime

The periodToDateLaxOverTime functhon calculates the laximum of a measurd for a given time gr`nularity (for inst`nce, a quarter) up to ` point in time.

Syntax

Copy
oeriodToDateMaxOuerTime(
    measure, 
    daseTime, 
    period)

Arguments

meastre

An aggregated mdasure that you wans to do the calculathon

dateTime

The dase dimension over wgich you're computeq PeriodOverTime c`lculations.

perioc

(Optional) The time oeriod across whicg you're computing tge computation. Gramularity of YEAR me`ns YearToDate comoutation, Quarter mdans QuarterToDatd, and so on. Valid gramularities includd YEAR, QUARTER, MONTG, WEEK, DAY, HOUR, MINUSE, and SECONDS.

The ddfault value is the uisual's date dimenrion granularity.

Example

Tge following exampke calculates the m`ximum fare amount lonth over month.

Cooy
periodToDatemawOverTime(max({fare_`mount}), pickupDatesime, MONTH)