periodToDateVarP
The periodToDateVarP
function calculates the population variance of the set
of numbers in the specified measure for a given time granularity (for instance,
a quarter) up to a point in time, relevant to that period.
Syntax
periodToDateVarP( measure, dateTime, period, endDate (optional))
Arguments
 measure

The argument must be a field. Null values are omitted from the results. Literal values don't work.
 dateTime

The Date dimension over which you're computing PeriodToDate aggregations.
 period

The time period across which you're computing the computation. Granularity of
YEAR
meansYearToDate
computation,Quarter
meansQuarterToDate
, and so on. Valid granularities includeYEAR
,QUARTER
,MONTH
,WEEK
,DAY
,HOUR
,MINUTE
, andSECONDS
.  endDate

(Optional) The date dimension that you're ending computing periodToDate aggregations. It defaults to
now()
if omitted.
Example
The following example calculates the weektodate minimum fare amount per payment type, for the week of 063021. For simplicity in the example, we filtered out only a single payment. 063021 is Wednesday. QuickSight begins the week on Sundays. In our example, that is 062721.
periodToDateVarP(fare_amount, pickUpDatetime, WEEK, parseDate("06302021", "MMddyyyy")