I don't think you can use a function in the Crosstable prefix, but you can use variables. So you have to load in original data, create variable based on FieldNumber(FIELD_Y), then use that and drop the original data (if necessary). I did this in tab Main in the attached file (uncomment first and comment main2 for it to work).
I think it's worth mentioning, if the number of fields that need to be crosstabled is always the same, it might be easier to use NoOfFields instead. I did this in the main 2 tab instead. In that case you don't need a field to show where the qualifying fields end that'll just get dropped later, or (if it's a field that actually has useful data that you want to keep), it gives you the option to add more dimensions on the right side of this field instead of just on the left side.
Do this by making your variable NoOfFields('Table1') - x, where x is the number of fields that need to be crosstabled.
Hope this helps!
EDIT: To test if either option works, reload, see the table box, then comment ID2, and you'll see it still makes the crosstable correctly.