By "only the first part works" I am assuming you mean that the calculation is only returning the first of the 2 values for all records depending on which is first. If this is not correct or the below answer does not help, please post a packaged workbook/sample data and provide more background on what you are trying to achieve, otherwise we will all just be guessing.
editing the formatting to show what is happening:
we can see that there are 3 separate conditions that make the first "if" evaluate to TRUE:
- [Grid Type]=2 AND ([Line Type]='T1-SRV' OR [Line Type]='T2')
- ([Graph Type]='T1-SRV')
- ([Graph Type]='T2')
If any of this are true the expression is true
for the Second "If" there is only 1 condition that allows it to be true:
- [Grid Type]=1 AND (([Line Type]='T1-SRV' OR [Line Type]='T2') OR ([Line Type]='T1-WKS') OR ([Line Type]='FIN'))
Parentheses colored in Blue are actually not needed here
Parentheses colored in Red make this evaluate as one expression
With out seeing your data I can only speculate that these 2 sets of conditions overlap partially or completely (i.e there are items of Grid Type=2 and Graph Type=T2 that you want to fall in to the second bin, but are going in to the first because they match one of the OR statements)
hope this helps, if not please post a packaged workbook and some more background on what you are attempting.