DAX Function Guide
SAMEPERIODLASTYEAR
Sam McKay
CEO & Founder
How does the SAMEPERIODLASTYEAR work?
SAMEPERIODLASTYEAR Formula Syntax
SAMEPERIODLASTYEAR(
<dates>
)
How do you use the SAMEPERIODLASTYEAR?
The SAMEPERIODLASTYEAR function can be used to declare that the values are moved one year back, based on “Date” column.
Related Blog Posts
Loading
Considerations when using the SAMEPERIODLASTYEAR?
The dates argument can be any of the following:
- A reference to a date/time column,
- A table expression that returns a single column of date/time values,
- A Boolean expression that defines a single-column table of date/time values.
Related Video Tutorials
Loading
Formula examples using the SAMEPERIODLASTYEAR
=CALCULATE(SUM(ResellerSales_USD[SalesAmount_USD]), SAMEPERIODLASTYEAR(DateTime[DateKey]))
= CALCULATE(SUM(‘GA Traffic'[Users]),SAMEPERIODLASTYEAR(‘GA Traffic'[Date]), AllExcept(‘GA Traffic’, ‘GA Traffic'[Date]))
= CALCULATE ( SUM (Sales [Sales Amount]),SAMEPERIODLASTYEAR (Sales [Date]) )
Related Courses
Loading