2 Replies Latest reply on Jun 7, 2018 4:21 PM by Nathan Mannheimer

    Pass same argument (Max(Performance)) to R (correlation function) for multiple investments/filters/funds (selected by user from drop down) to compare against

    Hamza Malik

      Here's the deal (and yes I am new to Tableau (10.5)).

       

      I want user to select an Investment (Fund) and 2 different benchmarks (BM1 & BM2).

      I also want the user to select date range over which the analysis will be conducts.

       

      Untitled1.png

      Here's what needs to be done:

      1 - create standard deviation for each Performance vector using R (Fund, BM1 and BM2) --> DONE!

                                     ----->      SCRIPT_REAL("sd(.arg1)",(MAX([Performance])))

      2 -  Calculate correlation coefficient, Beta,etc. for Fund Vs Benchmarks ie. correlation between Fund vs BM1 and correlation between Fund Vs BM2.

                                  To do this, I need to be able to specify that both arguments use Max(Performance), However, be able to link it to fund and Benchmarks.

                                    Something like this   ---->SCRIPT_REAL("cor(.arg1, arg1)",(MAX([Performance]) of Fund, MAX([Performance]) of BM1,)). Obviously, that is wrong.

       

      I need to be able to show comparative statistics for fund vs chosen BM1 and BM2 so I need to not only run correlation but other statistical measures as well that I cannot do in Tableau.

       

      Can someone please help me with this. I cannot share the data but please see screenshot.

       

       

      Hamza