ExcelAtEverything
Active Member
- Joined
- Jan 30, 2021
- Messages
- 351
- Office Version
- 2019
- Platform
- Windows
I'm having a problem which I'm not sure how to resolve..
The following GETPIVOTDATA formula is designed to grab the appropriate number of "Returns" processed for a given date. It normally works perfectly, but I noticed that every now and again it was throwing #REF errors (depending on the date). What's happening is this: Returns don't happen every day. Some days there will be none. On those "0 Return" days, the report isn't generating a record showing a "0". Instead, it's simply not generating anything for that day. So then when my Pivot formula attempts to locate it to return the number", there is no record and I get a #REF error.
The data list for this Pivot Table will grow every day as new sales records get loaded each day for the prior day. The Pivot Table itsef was created from an Excel doc sitting in a folder on my Desktop, which I accessed via Power Query>Data Model>Pivot Table.
How can I correct this? Thanks!
=GETPIVOTDATA("[Measures].[Sum of Quantity 2]",'R&E Yearly'!$B$5,
"[Order Returns Report].[Org #]","[Order Returns Report].[Org #].&[" &[@[Org '#]]& "]",
"[Order Returns Report].[Date]","[Order Returns Report].[Date].&["&TEXT($G$3-1,"yyyy-mm-dd") & "T00:00:00]",
"[Order Returns Report].[Date (Year)]","[Order Returns Report].[Date (Year)].&"&"["&YEAR($G$3-1)&"]")
The following GETPIVOTDATA formula is designed to grab the appropriate number of "Returns" processed for a given date. It normally works perfectly, but I noticed that every now and again it was throwing #REF errors (depending on the date). What's happening is this: Returns don't happen every day. Some days there will be none. On those "0 Return" days, the report isn't generating a record showing a "0". Instead, it's simply not generating anything for that day. So then when my Pivot formula attempts to locate it to return the number", there is no record and I get a #REF error.
The data list for this Pivot Table will grow every day as new sales records get loaded each day for the prior day. The Pivot Table itsef was created from an Excel doc sitting in a folder on my Desktop, which I accessed via Power Query>Data Model>Pivot Table.
How can I correct this? Thanks!
=GETPIVOTDATA("[Measures].[Sum of Quantity 2]",'R&E Yearly'!$B$5,
"[Order Returns Report].[Org #]","[Order Returns Report].[Org #].&[" &[@[Org '#]]& "]",
"[Order Returns Report].[Date]","[Order Returns Report].[Date].&["&TEXT($G$3-1,"yyyy-mm-dd") & "T00:00:00]",
"[Order Returns Report].[Date (Year)]","[Order Returns Report].[Date (Year)].&"&"["&YEAR($G$3-1)&"]")