Discussion board where members can get started with Qlik Sense.
Under Data>Measure>Expression need If statement that will look at established variables and allow for selection of Sum or Median formula.
Not really sure what you want, but may be something like this:
If(vVar = 1, Sum(Field), Median(Field))
I will try this and let you know
Okay, if it doesn't work, please provide more details of what you want.