
Re: Correlation in Chart
Nagaian Krishnamoorthy Jan 6, 2013 7:44 AM (in response to Shiran Ben Yehuda)You may add a text box to display the value =correl([MU Data], [$GP Delta])
Extract from the Qlikview Reference Manual for Correl function is:
correl ([{set_expression}] [ distinct ] [ total [<fld {,fld}>] ] xexpression,
yexpression )
returns the aggregated correlation coefficient for a series of coordinates represented by paired numbers in xexpression
and yexpression iterated over the chart dimension(s). Text values, null values and missing values
in any or both pieces of a datapair will result in the entire datapair to be disregarded. See also the rangecorrel(
xvalue , yvalue { , xvalue , yvalue}) function.
Xexpression and yexpression must not contain aggregation functions, unless these inner aggregations contain
the total qualifier. For more advanced nested aggregations, please use the Advanced Aggregation function in combination with calculated dimensions, see Add calculated dimension... .
This function has the same limitations for nested aggregation as the avg([{set_expression}] [ distinct ] [
total [<fld { , fld } >]] expression) function. The correl function supports Set Analysis and the total qualifier in the same way as the avg([{set_expression}] [ distinct ] [ total [<fld { , fld }
>]] expression) function.
Examples:
correl( Payments, Dates )
correl( A/B, X*Y/3 )
correl( total Payments, Dates )
correl( total <Grp> Payments, Dates)
Hope this helps.

Re: Correlation in Chart
Shiran Ben Yehuda Jan 6, 2013 8:31 AM (in response to Nagaian Krishnamoorthy)
Re: Correlation in Chart
Nagaian Krishnamoorthy Jan 6, 2013 8:53 AM (in response to Shiran Ben Yehuda)Replace [MU Data] and [$GP Delta] with the corresponding expressions in the chart text dialog box by clicking on the ... button.

Re: Correlation in Chart
Shiran Ben Yehuda Jan 8, 2013 5:02 AM (in response to Shiran Ben Yehuda)of course, i tried that,
the problem is that my expressions include aggregation functions (sum,count),
and i cant find a way to make it work,
also tried with variables but it didnt seem to work...

Re: Correlation in Chart
Suman Rao Jun 24, 2013 3:42 AM (in response to Shiran Ben Yehuda)A similar experiment is working for me. Try testing the same in a text box first. Text in the box = correl (Xexpression, Yexpression). You could include your aggregations, sums, averages, what have yous in these two expressions. Check if the text box displays it correctly. You could then fetch the data from the text box into the chart.
However, given that you seem to want it in the chart itself, and for future use (maybe future use is all that's to hope for, given how belated this reply is):
The linear trendline option does the same in the expressions tab of any chart. Isn't that a direct tool to have exactly what you seek, or I am being too naive in interpreting your situation?

Re: Correlation in Chart
Royce Roy Duya Nov 4, 2014 3:08 AM (in response to Suman Rao)I think Shiran would like to correlate 2 different selections, but the correlation formula only allows 1 set analysis, you cannot have different set analysis for yaxis and xaxis.
I am having the same problem on how to correlate the 2 expressions.



