Forum Discussion
Matrix period showing incorrect total when using previous year measure
- 2 months ago
Hi J_Eastwood,
You can try the following measure instead of using [Prev Year Count] directly in the matrix –
Prev Year Count Display = IF( ISINSCOPE('Calendar'[Fiscal Quarter]), [Prev Year Count], SUMX( SUMMARIZE( 'Calendar', 'Calendar'[Fiscal Year], 'Calendar'[Fiscal Quarter] ), CALCULATE([Prev Year Count]) ) )- At the Fiscal Quarter level, it returns the original [Prev Year Count] value.
- At the Fiscal Year total level, Power BI normally recalculates the measure for the entire year, which can produce unexpected totals when using DISTINCTCOUNT.
- This measure overrides that behavior by summing the quarter-level previous year values, making the Fiscal Year total align with the visible quarter rows.
Use [Prev Year Count Display] in the matrix instead of [Prev Year Count] and check whether the Fiscal Year totals now match your expected results.
💡 Helpful? Give a Kudos 👍 — keep the community growing
✅ Solved your issue? Mark as Solution ✔️ — help others find it faster
Best regards,
Rupasree Achari | BI & Fabric Analytics Engineer
Hi J_Eastwood,
Thank you for reaching out to Microsoft Fabric Community.
Thank you Rupa01, parry2k and Ashish_Mathur for the prompt response.
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the user's for the issue worked? or let us know if you need any further assistance.
Thanks and regards,
Anjan Kumar Chippa
thank you, I've been unavailable for a couple of days, but have now caught up. Rupa01 , Ashish_Mathur , parry2k much appreciated for your responses