Referencing Column Name from another table

I have figured it out! I used the switch statement to check the type of battery used and then summed the corresponding column in the Toys table.

=Switch(
     thisRow.[Battery Type], 
         "AAA", Toys.AAA.Sum(), 
         "AA", Toys.AA.Sum(), 
         "C", Toys.C.Sum(), 
         "D", Toys.D.Sum(), 
         "9V", Toys.9V.Sum()
)

Thank you everyone again for your assistance in figuring this problem out. You guys are terrific!

-Rick

2 Likes