Forum Discussion
use results from filtered table
- Sep 16, 2024
operations240 in the attached are 2 examples 1 pivot table and 1 example manual FILTER tables.
Since each of these are dynamic you really need to have the allocated hours in a table for lookup. In the attached I just added a column to the existing table for allocated hours. In the pivot table I added a calculated field for the difference in the manual I just did more calculations (lol). Hope this helps
=SUM(FILTER(Data[Hours], (Data[Name]="Duane")*(Data[property]="A"),0))
to get sum of hours for Duane for property A but I would replace both "Duane" and "A" with references. For example in sheet 2 you can have cell A2 be =SORT(UNIQUE(Data[Name])) to get a full list of names from the other table and then in B1 be =TRANSPOSE(SORT(UNIQUE(Data[Property]))) to get a full list of properties in row 1
then in B2 you would have:
=SUM(FILTER(Data[Hours], (Data[Name]=A2#)*(Data[property]=B1#),0))
but that is just a manual reproduction of a Pivot table but if you know how to do that you could tweak it for more customized calculations/manipulations if needed (e.g. incorporating the max hours per location and such but not sure how that all plays in). But if not need I would just do the pivot table and you're done.
- operations240Sep 16, 2024Copper Contributor
m_tarler I tried a pivot table prior to making this post, but I am very rusty (haven't done a pivot table for many years!), and couldn't seem to get the hours to add up correctly no matter how I changed the output in the options.
This is a shot of the table I am using.
I want to be able to have an output that looks something like this:
I want to be able to filter the first table by caretaker name, and have the filtered cells be the output for the second table. The hours allocated to property will be populated manually, with the difference a simple calculation.
- m_tarlerSep 16, 2024Bronze Contributor
operations240 in the attached are 2 examples 1 pivot table and 1 example manual FILTER tables.
Since each of these are dynamic you really need to have the allocated hours in a table for lookup. In the attached I just added a column to the existing table for allocated hours. In the pivot table I added a calculated field for the difference in the manual I just did more calculations (lol). Hope this helps
- operations240Sep 17, 2024Copper Contributor
m_tarler Many thanks for that; I was planning on setting up the allocated hours on a separate sheet, so many thanks for the help!