Forum Discussion
ToddTranservice
Oct 18, 2023Copper Contributor
Pivot Table not displaying all the data.
I have a file that has multiple pivot tables. For some reason the pivot tables are not pulling across all of the data from the source table.
It will find the line of data and display the first column but not the rest of the associated data for that line. I've verified that the source table has the information. You can see lines 234288 and 234315 as examples. The columns are just showing as blank.
so as you know I originally suggested a pseudo-random formula that uses a seed and that way you could feed the week# or day# or such to the pseudo function and always get the same output, but changing the seed to the new week/day/other will produce a new random number/sequence. The problem is the 'must be occupied' part since that will also change over time so you would have to keep a logging of WHEN units become occupied and vacant.
The other alternative is to use the built in random generator based on current state of the rooms and then copy/past those results (paste values) into the table. Maybe the easiest is to have a column called [Inspection date] and another called [Inspection Update]. under inspection date will ultimately be the actual date of inspection. and I'm sure you have a column to check if occupied (maybe their name or whatever) but for this we will assume a column called [Occupied] that is true or false. Then=LET(r,RANDARRAY(ROWS( [InspectionDate] ))* [Occupied] *( [InspectionDate] =""), t,INDEX(SORT(r,,-1), 14), o,IF(r>=t,TRUE,""), IF( [InspectionDate] ="",o, [InspectionDate] ))
so in line 1 it will create a random array or numbers but zero out the unoccupied and previously inspected rows
in line 2 it will find the Nth largest value, in this example the 14th
in line 3 it will blank out all but the top 14 and replace those with TRUE
and the final output (line 4) will be either the prior inspection date or TRUE if the inspection should be done.
being a RAND function the result will keep changing every time you edit anything on the sheet so when you are ready to committ for that week select that column and COPY then select the [InspectionDate] column and goto Paste->Paste Special->Values Only
Since all the prior dates are repeated it will just add the TRUE to the new locations and those TRUE can be replaced with actual inspection dates. Alternatively you could replace the TRUE in line 3 with WEEKNUM(TODAY()) and then each week you run it and it will just show which weeknum those rooms were selected.
Final caution is that even though rooms that were not occupied will get occupied and have the opportunity to get selected throughout the year this way, you can still have an issue at the end of the year if one or more of those remaining 14 rooms become unoccupied at that point of the year.
2 Replies
Sort By
- LeonPavesicSilver Contributor
Hi ToddTranservice,
it appears that the pivot table is not displaying all of the data because the "Show values as" setting is set to "Sum". This setting will only display the sum of the values in the value field for each row and column.
To display all of the data, you can change the "Show values as" setting to "Count", "None", or another appropriate calculation.
To change the "Show values as" setting, right-click on the value field in the pivot table and select "Show Values As". Then, select the desired setting.
Here is a link to an article that explains how to change the "Show values as" setting in a pivot table:
How to change the "Show values as" setting in a pivot table: https://support.microsoft.com/en-us/office/show-different-calculations-in-pivottable-value-fields-014d2777-baaf-480b-a32b-98431f48bfecPlease click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.If the post was useful in other ways, please consider giving it Like.
Kindest regards,
Leon Pavesic
(LinkedIn)- ToddTranserviceCopper ContributorGood morning,
Thank you for the suggestion. I followed the instructions in the link, however there was no option for Show Values As as indicated in the solution.
I confirmed that the field settings subtotals were set to none. In the end, I found that if I chose expand field for all of the "missing" data that it displayed. I've run an update since and it does not seem to have reappeared at this time.
Thanks