Group Pipes by Schedule

We have a few different pipe materials that we commonly use (PVC, CPVC, Galvanized, Carbon Steel, Stainless Steel, etc.). Each different material has it's own file with configurations for sizes. On our BOM we want to group all of the pipe of a specific material, size, and schedule and get a total length of that pipe. My problem is that the Group Pipes by Schedule options groups all of the schedule 40 pipes regardless of material and give a total length. I edited the routinglib.db file so that the schedule value would be "Sch 40, Material" but nothing changed on the BOM. Does anyone have any suggestions on how to make solidworks recognize these as seperate parts?

SolidworksRouting