I have 2 calculated fields both returning same data. I can drag one of them(calculation 2) to filter shelf, but not the other (calculation 1). Both use R scripts. The only difference is one script uses simple if else statements and the other uses an R package. I don't understand why this happens since both of them return same data. Here I have attached workbook.
It may be that one is a Table Calculation and the other is a row-level calculation, or something like that. When I attempt to open your workbook, I get errors so I cannot see exactly what you've done thus far.