When you create a pivot table in Excel, it manipulate the data as number and when you ask to pivot a table with string value, even if you set the function to max, you will get number.
Example with two columns : =CONCATENATE(A2;B2)
You will end up with a table as this one :
VLOOKUP(CONCATENATE(G$1;$F2);$C$2:$D$8;2;FALSE)
The V in VLOOKUP stands for vertical.
VLOOKUP :
The primary key column (the combination column) must be in ascending order
To manage the #N/A, you can use the IF and ISNA function and you ends up with this formula.
=IF(ISNA(VLOOKUP(CONCATENATE(G$1;$F2);$C$2:$D$8;2;FALSE)); "";VLOOKUP(CONCATENATE(G$1;$F2);$C$2:$D$8;2;FALSE))