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!
Hi v-jiascu-msft,
Thank you for the explaination.
I finally found another way to calculate sale year to date using filter instead of SAMEPERIODLASTYEAR.
It is working quite fine now.
Thank you!
Hi Anonymous,
I'm glad you solved it. Can you share the solution, please? Please also close this thread.
Best Regards,
Dale
- Anonymous7 years agoNot applicable
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!