i want to let the user choose between average and median in buttons.
So, is it possible to take the Avg and Median function in a variable, let say v_fun?
And how to evaluate functions within the variable on my dimension, let say body_weight? (How does the syntax look like?)
Create a variable and assign the value like below
variable name: v_fun
In chart, ur dimension and expression is like
-- gives average of body_weight based on ur dimension
View solution in original post
Thanks for your answer. It works.
What does $1 achieve in this context, especially when $(v_fun(body_weight)) is evaluated?
$1 here is works like parameter, you can pass any field name.