Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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
User | Count |
---|---|
86 | |
82 | |
68 | |
66 | |
55 |
User | Count |
---|---|
123 | |
100 | |
90 | |
83 | |
66 |