POWERFUL TIME-BASED FEATURES
IN
POWER QUERY
@PREMMANDAL CLEAN AND SHORT PDF FOR YOU
BUSINESS & DATA ANALYST EASY TO LEARN
1 Year-to-Date (YTD)
🔹 What is it?
Filters data from the start of
the year to the current date.
🔹 When to use it?
Use YTD for reports that
need to show cumulative
data for the current year.
🔹 Formula:
CurrentDate = [Link](),
YTDData = [Link](Source, each
[DateColumn] <= CurrentDate)
2 Year-to-Go (YTG)
🔹 What is it?
Filters data from today to
the end of the current year.
🔹 When to use it?
Helpful when projecting
future trends or goals for the
rest of the year.
🔹 Formula:
CurrentDate = [Link](),
YTGData = [Link](Source, each
[DateColumn] > CurrentDate)
3 Quarter-to-Date (QTD)
🔹 What is it?
Filters data from the start of
the current quarter to today.
🔹 When to use it?
Ideal for quarterly financial or
performance reports.
🔹 Formula:
CurrentQuarter =
[Link](CurrentDate),
QTDData = [Link](Source, each
[Link]([DateColumn]) =
CurrentQuarter and [DateColumn] <=
CurrentDate)
4 Month-to-Date (MTD)
🔹 What is it?
Filters data from the start of
the month to the current date.
🔹 When to use it?
Great for tracking monthly
performance metrics.
🔹 Formula:
CurrentMonth = [Link](CurrentDate),
MTDData = [Link](Source, each
[Link]([DateColumn]) =
CurrentMonth and [DateColumn] <=
CurrentDate)
5 Rolling Period (Last 7 Days)
🔹 What is it?
Filters data for the past 7
days.
🔹 When to use it?
Perfect for tracking short-term
trends, such as daily sales or
traffic.
🔹 Formula:
StartDate = [Link](CurrentDate, -7),
Last7DaysData = [Link](Source,
each [DateColumn] >= StartDate and
[DateColumn] <= CurrentDate)
6 Year-over-Year (YoY)
🔹 What is it?
Compares the current date range with
the same period last year.
🔹 When to use it?
Helpful for understanding how
performance has changed from the
previous year.
🔹 Formula:
LastYearDate = [Link](CurrentDate, -1),
YoYData = [Link](Source, each
[DateColumn] >= [Link](LastYearDate) and
[DateColumn] <= [Link](CurrentDate))
7 Fiscal Year Calculations
🔹 What is it?
Filters data for a custom fiscal year,
not the calendar year.
🔹 When to use it?
Essential for organizations that operate
on a fiscal year (e.g., April–March).
🔹 Formula:
FiscalYearStartMonth = 4,
FiscalYear = if [Link](CurrentDate) >=
FiscalYearStartMonth then [Link](CurrentDate)
else [Link](CurrentDate) - 1,
FiscalYTDData = [Link](Source, each
[DateColumn] >= #date(FiscalYear,
FiscalYearStartMonth, 1) and [DateColumn] <=
CurrentDate)
@PREMMANDAL
BUSINESS & DATA ANALYST
Was this helpful
WOULD YOU MIND SHOWING YOUR SUPPORT
BY GIVING IT A LIKE?
INSPIRE ME TO CREATE MORE!