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.
Hello,
We are trying to do a year over year comparison by month. Every year works great except for when the previous year was a leap year. Please see below for the behavior. We are using the SAMEPEROIDLASTYEAR expression.
Any help is appreciated and thank you!
@dbowman ,
You may try PREVIOUSYEAR() instead. Please refer to: https://docs.microsoft.com/en-us/dax/previousyear-function-dax. However, if this issue persists, could you share some sample data and clarify more details about your expected result?
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-yuta-msft,
Thanks for your response. This is not working either. And we also have another issue now.
Current year count is a value from the month query.
Previous Year - Received = CALCULATE(SUM('Month'[Month Received Count]),SAMEPERIODLASTYEAR('Month'[Month End Date]),ALL('Month'))
Year in chaart is a value on the month query.
Month end date is a value on the month query.
Year slicer is a value from teh dates query, related to the month query.
Issue 1. Previous year being a leap year, breaking the month of February visual.
Issue 2. Previous year measure not showing at all on visual unless more than one year selected in slicer.
Thanks,
David
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 |
---|---|
112 | |
97 | |
82 | |
67 | |
61 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |