Forum Discussion
Anonymous
7 years agoNot applicable
Function 'SAMEPERIODLASTYEAR' expects a contiguous selection Issue
Hello, I have a problem using SAMEPERIODLASTYEAR function to calculate the sales YTD. Here is my setup: - I have a databable with date called FACT[InvoiceDate]. Format is date. - I created ...
- Anonymous7 years ago
Hi v-jiascu-msft,
I am using filter instead as follow:
TOTAL SALES YTD =
CALCULATE (
SUM (FACT[Sales] ),
FILTER (
ALL ( 'Date' ),
YEAR ( 'Date'[Date] ) = YEAR ( TODAY () )
&& 'Date'[Date] <= TODAY ()
)
)Thanks all for your help!
AlexisOlson
7 years agoSuper User
Try deleting and recreating the relationship. The dates table should not have multiple rows for the same date.
If your dates table has duplicate dates, then something is likely wrong with it.
Anonymous
7 years agoNot applicable
I deleted and re-created the link but same issue.
I also created a new date table : Date = CALENDAR(DATE(2016,1,1), today()), same issue with the relationship
In my date table, there is no duplication and I am using format Date.