A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi jan_dh,
Thanks for your post in Microsoft Community.
The behavior you're observing is indeed normal. According to the description of the GETPIVOTDATA function, its operation is based on referencing cells. Once the cell being searched for is no longer present in the table because its corresponding field is collapsed, it will directly return a reference error.
For more information, please see: GETPIVOTDATA function - Microsoft Support
Should you indeed have this requirement, you're welcome to submit your feedback through the Feedback Hub. Hopefully, the Microsoft development team will enhance this feature in the future to accommodate such needs.
I hope the information above is helpful to you!
Best Regards,
Thomas C - MSFT | Microsoft Community Support Specialist