Forum Discussion
Issues with Previous Years actuals
Hi everyone,
I'm currently building a financial statement in Power BI using a matrix visual, and I'm running into an issue with my "Previous Year Actuals" measure. Everything works perfectly for current year actuals, but when I bring in the "Previous Year Actuals" measure, certain rows — specifically, the calculated subtotal lines like Gross Margin, EBITDA, etc. — are not displayed in the matrix. See snip from powerbi in the end of this messsage. Thanks for all the help!
ActualsPL and Previous Year Actuals measures are below.
I’ve also tried using SAMEPERIODLASTYEAR measure for the , but that causes an error in the matrix and nothing is shown.
"Previous Year Actuals =
CALCULATE(
[ActualsPL],
SAMEPERIODLASTYEAR('Calendar'[Date])
)"
Thanks all for the help - Now it works. I don't really know what I did, but at least I made the Calendar query again and that seemed to fix everything😀
8 Replies
- FBergamaschi
Super User
Can you please share the pbix via some cloud service?
Thanks
- FBergamaschi
Super User
A simple approach like this
CALCULATE([ActualsPL],SAMEPERIODLASTYEAR( 'Calendar'[Date] ))should workIf it does not, as the post author says, I think we need to see the modelIf this helped, please consider giving kudos and mark as a solution
me in replies or I'll lose your threadconsider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
- CrideziRegular Visitor
Thanks all for the help - Now it works. I don't really know what I did, but at least I made the Calendar query again and that seemed to fix everything😀
- v-kpoloju-msft
Community Support
Hi Cridezi,
Glad to hear that it is working now. Sometimes just rebuilding a query helps clear out hidden issues like step mismatches or type conflicts. Recreating the Calendar query likely refreshed the schema and resolved any underlying inconsistencies.
let me know what you find after giving these steps a try happy to help you investigate this further.
Thank you for using the Microsoft Community Forum.- v-kpoloju-msft
Community Support
Hi Cridezi,
Just checking in to see if the issue has been resolved on your end. If the earlier suggestions helped, that is great to hear! And if you’re still facing challenges, feel free to share more details happy to assist further.Thank you.
- v-kpoloju-msft
Community Support
Hi Cridezi,
Thank you for reaching out to the Microsoft fabric community forum. I reproduced the scenario, and it worked on my end. I used my sample data and successfully implemented it.
You might also find this community thread helpful it discusses a similar issue: Actuals vs YTD Actuals vs Previous Year YTD Actual Matrix
I am also including .pbix file for your better understanding, please have a look into it:
Hope this helps clarify things and let me know what you find after giving these steps a try happy to help you investigate this further.
Thank you for using the Microsoft Community Forum.