3 Replies Latest reply on Nov 27, 2018 4:00 AM by Yuriy Fal

    Correlation Matrix of All Measure

    Usman Tariq

      Hi,

      I am new to tableau. And I am trying to learn some of its feature. I wanted to make a correlation plot but instead of two measures, I want to make a correlation plot of all my measure. I have gone through some of the other discussion and example e.g Bora Beran. But they are not up to my requirement because I don't have any dimension in my data. All I want is to pass my multiple columns (Measure) and get their correlation matrix just like we do in R, we just have to pass our required columns to corr() function and it returns correlation matrix of that column. Any help would be appreciated

        • 1. Re: Correlation Matrix of All Measure
          Yuriy Fal

          Hi Usman,

           

          In Tableau the CORR() is an aggregate function

          (and the WINDOW_CORR() is her Table Calc cousin),

          which takes the two vectors as an input

          and produce a single vector as an output

          (and using only the Pearson to calculate).

           

          Hope it helps understanding.

           

          Yours,

          Yuri

          • 2. Re: Correlation Matrix of All Measure
            Usman Tariq

            Hi, Yuri

             

            Thanks for the reply. But I wanted to ask is it not possible if I could somehow do it in the Calculated field. Since it does not support any kind of loop so is there any other alternative way? In which I could calculate the correlation of one Measure with all other Measure?

            • 3. Re: Correlation Matrix of All Measure
              Yuriy Fal

              Hi Usman,

               

              You're right, there's no looping calc logic in Tableau,

              so one outta brute force via some data transformations.

               

              I could imagine the Un-Pivot of all Measures

              into the two columns (Names & Values),

              then do Self-Join ON the [Row ID] column

              (you have to have one in the datasource)

              to get all Measures combinations.

               

              Then a matrix view would be just a click away.

               

              Yours,

              Yuri