Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello, I was comparing total sales of this year vs last year. But look at the picture, In 2011, the last year sales is not matching with 2010. This is my dax formula
sales LY = CALCULATE( [Total Sales], SAMEPERIODLASTYEAR(DimDate[Date]))
What's the problem actually?
Solved! Go to Solution.
Yeah, I have deleted it. I found the problem. I mistakenly chose Fiscal Year instead of Calender year (I could not notice it). Now everything is all right with the sales LY = CALCULATE( [Total Sales], SAMEPERIODLASTYEAR(DimDate[Date])) formula.
Your last code didn't work actually. But I am grateful to you because you tried to help me a lot. Thank you so much.
Yeah, I have deleted it. I found the problem. I mistakenly chose Fiscal Year instead of Calender year (I could not notice it). Now everything is all right with the sales LY = CALCULATE( [Total Sales], SAMEPERIODLASTYEAR(DimDate[Date])) formula.
Your last code didn't work actually. But I am grateful to you because you tried to help me a lot. Thank you so much.
I disagree with your assessment. I'm not going to write it for you but I'm trying to give you encouragement.
See my previous post for hint.
I was trying to give the algorithm rather than explicit directions for the measure.
Filter arguments are of the form : column = some value (which uses an aggregation).
You have part of the solution but not all of it.
I suspect this is to do with getting a date period shifted back 1 year but what you really want is to subtract one from the Fiscal year filter. There will be differences of a few days which shows as a difference in the table .
So rewrite the measure without sameperiodlastyear but subtracting 1 from the fiscal year
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
11 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
11 |