The should be a way to refer to marked items in a custom expression. for example:
sum(if([field1] in marking, 1, 0)) as [var1],
sum(if([field1] not in marking, 1, 0)) as [var2]
where marking is selected in a different visualization.
I know that I could use subsets in order to get similar results, anyway I think this may be very helpful.