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!
Anonymous
7 years agoNot applicable
Hello petrovnikitamai,
I tried to add new table with DateAdd but the problem is the same.
The Last year to Date take the entire year of sales.
I also tried SUM(Fact[Sales]) instead but not working.
Is there any alternative to this SAMEPERIODLASTYEAR formula?
Thank you very much!
Ashish_Mathur
7 years agoSuper User
Hi,
Share the link from where i can download your PBI file.