Pivot Table Sum giving Zeros but count works

aspengarza

New Member
Joined
Jan 31, 2024
Messages
3
Office Version
  1. 365
Platform
  1. Windows
I have a workbook that is helping my team track weekly inventory of something in our lab. We scan one barcode that contains the information required for weekly inventory (Lot ID, Variety, and number of pouches). The next three columns after the scan will split the text by a delimiter using the TEXTSPLIT() function. Originally, when we were scanning 3 separate barcodes for the information, I could use the SUMIFS() function to calculate the totals based of 2 criteria. The SUMIFS function cannot read a cell if it is populated by a formula, so I switched to using pivot tables.

I created 2 pivot tables: One with the expected values for inventory and one with the "Scan to Count" values.
I need the Scan to Count pivot table to sum all the pouches for one variety per day it is scanned. Right now the "Count" version will work on the pivot table; If I scan in 8 boxes each with 50 pouches, it will display 8. But when I switch to "Sum" it changes all values in the pivot table to 0.
I found other posts saying to ensure the data source is in number format, so I did this on the entire column of "Number of Pouches" but this did not fix the issue.

I am now wondering if it is the same issue as the SUMIFS() function, where the pivot table can't read the result of a formula. I attached an image, but can't download the add on to allow for a mini-sheet.
Any ideas?
Thanks!
Aspen Garza
 

Attachments

  • Screenshot 2024-02-01 073935.png
    Screenshot 2024-02-01 073935.png
    22 KB · Views: 23

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
The results of TEXTSPLIT are text, nut numbers, which is why they sum as 0 for both the pivot table and the SUMIFS formula. What is the actual textsplit formula?
 
Upvote 0
The exact formula is: =TEXTSPLIT(Table7[@[Data Matrix]],"-")
We are scanning information into Table 7, the column is titled Data Matrix, and the delimiter is a hyphen "-"
Is there another way to split text by a delimiter so that it does not cause these issues?
 
Upvote 0
If it's ok to convert anything that looks like a number into a number you could use something like:

Excel Formula:
=LET(d,TEXTSPLIT(Table7[@[Data Matrix]],"-"),IFERROR(--d,d))
 
Upvote 0
Solution
This worked perfectly for what I needed! Thank you so much for your quick responses.
What is the 'd' in that formula though?
 
Upvote 0
d is just a variable that holds the result of the TEXTSPLIT formula. Without it, you would have to repeat that part like this:

Excel Formula:
=IFERROR(--TEXTSPLIT(Table7[@[Data Matrix]],"-"),TEXTSPLIT(Table7[@[Data Matrix]],"-"))
 
Upvote 1

Forum statistics

Threads
1,223,948
Messages
6,175,579
Members
452,653
Latest member
craigje92

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top