Hi Andrew,
Please be aware that there are some limitations with using BEx variables in a WebI/BICS context.
You might find more information in the following document published by Ingo Hilgefort:
SAP BusinessObjects BI4 - Supported BEx Query Elements
Best regards,
Sander