Forum Discussion
Function 'SAMEPERIODLASTYEAR' expects a contiguous selection Issue
- 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!
i do not know what wrong
try to use equivalent formula
DATEADD('Date'[Date],-1,year)
or try to use in Total Sales YTD Last Year SUM(Fact[Sales]) instead link to measureFACT[Total Sales].
- Anonymous7 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_Mathur7 years agoSuper User
Hi,
Share the link from where i can download your PBI file.
- Anonymous7 years agoNot applicable
Hi Ashish_Mathur ,
unfortunatelly my BI is using only direct query so you won't see the data.
Perhaps I can do specific screenshot that can help you?
Thank you,