I have some data with a list of Product IDs and I want to assign the Product IDs a category name based on specified criteria. Some examples are below.
IIF Product ID = #*C#* then category name = Cable
IIF Product ID = 00#* or 497* then category name = Component
...
I can get it to work using multiple IIF statements:
Product Type: IIf([Product ID] Like "#*C#*","Cable",IIf([Product ID] Like "00#*" Or [Product ID] Like "497#*","Component",IIf([PIDType4]="7346M" Or [PIDType5]="CPP7346M","7346M","Regular Product")))
But I have a lot more criteria I would like to enter in and gets hard to manage it this way. Is there somehow I can create a table with all of these criteria and just reference the table instead?
Thanks,
Adam
IIF Product ID = #*C#* then category name = Cable
IIF Product ID = 00#* or 497* then category name = Component
...
I can get it to work using multiple IIF statements:
Product Type: IIf([Product ID] Like "#*C#*","Cable",IIf([Product ID] Like "00#*" Or [Product ID] Like "497#*","Component",IIf([PIDType4]="7346M" Or [PIDType5]="CPP7346M","7346M","Regular Product")))
But I have a lot more criteria I would like to enter in and gets hard to manage it this way. Is there somehow I can create a table with all of these criteria and just reference the table instead?
Thanks,
Adam