Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi, I am new to PowerBI and I've been trying to calculate the sales amount using SAMEPERIODLASTYEAR but it's not working. I have the monthly sales data from Jan 2020 to March 2021 and I also created a date table called 'Calendar' (marked this as date table as well). This is the formula I used to calculate the sales amount:
However, when I checked the results using matrix, I did not obtain any figures in the Sales Last Year Column for Jan 2021 to March 2021. Instead, I obtained figures for Jan 2020 to July 2020, which is obviously wrong.
Can someone help me with this? Thank you!
Solved! Go to Solution.
Hi @Anonymous ,
Are you using calendar[Date] for the date column in your table visual? If not, you should.
*EDIT* Also, silly question, but have you related your calendar table to your fact table?
Pete
Proud to be a Datanaut!
Hi @Anonymous ,
Are you using calendar[Date] for the date column in your table visual? If not, you should.
*EDIT* Also, silly question, but have you related your calendar table to your fact table?
Pete
Proud to be a Datanaut!
It works now! Thank you 🙂
@Anonymous ,
Cool, glad it's working for you now.
Please mark my answer as the solution to ensure that other people facing the same issue can find the answer quickly.
Ta,
Pete
Proud to be a Datanaut!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
98 | |
97 | |
81 | |
77 | |
66 |
User | Count |
---|---|
126 | |
105 | |
103 | |
81 | |
72 |