Hello everybody!
As I am new to Alteryx please be so kind and correct me in cases of abusing the "usual alteryx notation".
My question is the following one:
How can I assign a value, which I computed in a workflow to a "global variable" or constant in order to use it in the workflow again?
Toy-Example:
Given the following table:
Workflow :
1) Compute the mean of A,
For example this could be solved using the in-buildt summarize tool
2) Store the mean of A in a "global variable", e.g. avg_A:=mean(A)
3) substract avg_A from each entry of the column B
For example this can be done by the in-buildt formula-tool
The "Pseudo-code" for this Toy example would look like :
#Assume A, B are simply vectors and not a matrix and A[i] denotes the i-th row/component of A
#1stdeclare a variable/constant
var mean_A=0;
#2nd compute the mean of the values of A
for(i=1,length(A),i++)
{
mean_A=mean_A+ A[i];
}
mean_A=mean_A / lenght(A);
#3rd substract mean_A from each component of B
for(i=1;length(B),i++)
{
B[i]=B[i]-mean_A;
}