Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi! This is the continuation of my previous threat Agreggation and set analysis with parameters
What happens is that i need the implement the solution in a very particular way.
I have a table (like the one in the sample data), and i want to call in an expression a variable(with the ID conditional) that will call the final variable(the one with aggr and the one that actualy does the calculations).
I add my sample data updated with this solution (or tryal of it at least) and you will see it much clearly.
So it is something like this:
Expression:
EXPRESSION: $(filter(FY={'FYQ4'}))
Variables:
filter: =if(ID=4,$(weightedmean($1)) )
weightedmean: sum({<$1>} Aggr(DISTINCT Csat_Target * Weights, link_targets)) / sum( {<$1>} Aggr(DISTINCT Weights, link_targets) )
How could I solve it? I really don't understand why it is not working! It is just calling variables!
Thanks,
I will try to look for your answers during the weekend Have a good weekend!
Hi Lluis,
I'm not sure. But try to remove the '=' sign for the variable 'filter'. And add the 'ID' into the weightedmean variable.
Like
Variables:
filter: if(ID=4,$(weightedmean($1)) )
weightedmean: sum({<$1>} Aggr(DISTINCT Csat_Target * Weights, link_targets,ID)) / sum( {<$1>} Aggr(DISTINCT Weights, link_targets,ID) )
Hi Lluis,
I'm not sure. But try to remove the '=' sign for the variable 'filter'. And add the 'ID' into the weightedmean variable.
Like
Variables:
filter: if(ID=4,$(weightedmean($1)) )
weightedmean: sum({<$1>} Aggr(DISTINCT Csat_Target * Weights, link_targets,ID)) / sum( {<$1>} Aggr(DISTINCT Weights, link_targets,ID) )
Hei! Sorry for not answering i was out for the weekend!
This worked perfectly!
Thanks again!