You can always use what you're using in SQL then load the whole thing in Qlik.
For you example, no need to change a thing, just do as follow:
SELECT @itemVarianceAvg = AVG(is_item_variance)
( SELECT VAR(i_item_score) AS is_item_variance
WHERE i_exam_form = @currentForm
GROUP BY i_item_name
) AS S
with that, you'll do the work in the Select part, as you were doing then load what you wanna load in Qlik.
Hope this helps