Time Series Analysis in Power BI
Kevin Barlow
Data Analytics Professional
The identified span of a time series datasets impacts the kind of analysis we can perform. Different sizes of time "windows" carry different levels of information.
Expanding window functions generally apply towards larger scale analyses from a reference point.
Some examples include:
Examples:
CALCULATE(SUM(sales[profit]),
sales[date] >= DATE(2020,1,1))
CALCULATE(AVERAGE(weather[temp]),
weather[date] <= TODAY())
TOTALYTD(COUNT(shipping[id]),
shipping[ship_date])
Rolling window functions are typically used to analyze the current state. Quite often, these are used to calculate various KPIs that are important for the health of an organization.
Some examples include:
Examples:
CALCULATE(MAX(stocks[high]),
stocks[date] >= DATEADD(TODAY(),
-30, DAYS))
CALCULATE(AVERAGE(sales[discount]),
sales[date] >= DATEADD(TODAY(),
-1, YEAR))
CALCULATE(AVERAGE(ship[delay]),
ship[ship.date] >= DATEADD(TODAY(),
-6, MONTH))
Time Series Analysis in Power BI