Forum Discussion
red_ltxj
1 year agoFrequent Visitor
Dynamically Calculating Correlation Coefficients Based on Selections of Field Parameters
Hi everyone, I would like to create a function where I can dynamically calculate correlation coefficients between two indexes of countries (e.g., Cost of Living Index, Groceries Index, etc.) bas...
mo_measures
1 year agoNew Member
I feel like there is probably a better way but maybe this will help spur some ides.... Create two new tables
X_Table ={"Cost of Living","Groceries","Purchasing Power" ...}
Y_Table = {"Cost of Living","Groceries","Purchasing Power" ...}
then use switch
X_Switch = SWITCH(SELECTEDVALUE(X_Table),
"Cost of Living",SUM(Cost of Living)
"Grocersies",SUM(Groceries)
etc
Y_Switch = SWITCH(SELECTEDVALUE(X_Table),
"Cost of Living",SUM(Cost of Living)
"Grocersies",SUM(Groceries)
etc
Then use the X Switch and Y Switch in the corrleation formula. and add slicers to page with X table, Y table.