Forum Discussion
Anonymous
7 years agoNot applicable
SAMEPERIODLASTYEAR returns bank
Hello all, I am working on the AdventureWorks tables and trying to create a Sale Performance report. I have these three measures: Total Sale = SUMX(InternetSales, InternetSales[OrderQuantity...
- Anonymous7 years ago
Hi
It's because your Slicer is using a calculated column and your measure for Same period last year is using another column.
The sameperiodlastyear function must use the same column that you are filtering with your slicer.
Anonymous
7 years agoNot applicable
Yes, now I understand what the problem is.
Thank you for the explanation.
I just wanted to have 'year' separately, and by using YEAR(date) function, the return value is an integer which can not be used in the SAMEPERIODLASTYEAR function.
The only option that I have( or I can think of) is to add a calendar to my slicer like below:
v-chuncz-msft
7 years agoCommunity Support
Anonymous,
You may add ALL Function.
https://community.powerbi.com/t5/Desktop/Last-Fiscal-Year-Total-by-Month-DAX/m-p/224625#M99894