Forum Discussion
Dax SamePeriodLast year without dates
Hi, Anonymous
Function sameperiodlastyear returns a table that contains a column of dates shifted one year back in time from the dates in the specified dates column, in the current context. For further information, you may refer to the official document .
Typically, your data model will contain a calendar table. In fact, it is usually better to aggregate data
by year and month using columns of a calendar table (containing one row for each day) instead
of extracting the date parts from a single column of type date or datetime in calculated columns.
There are a few reasons for this choice. You obtain a model wherein all date attributes are included
in a separate table making it easier to browse data using a generic client, and you can use special
DAX functions that perform time intelligence calculations. Moreover, most of the time intelligence
functions require a separate Date table to work correctly.
You may also refer what is suggested by amitchandak . It may help.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.