5 Replies Latest reply on May 16, 2018 6:52 AM by Mavis Liu

    Correlation approach support

    Alex Klein

      Hi all,


      I am a new user to Tableau (2018.1) and I need to visualise a correlation simplified below - appreciate this is a very general request, but I would really appreciate a solution or tips on how to approach the below.


      As an output, I need a graph with horizontal axis to show products total revenue, and vertical axis sales person total revenue and a scatterplot to see how these correlate. I would like to see whether the highest revenue sales people are selling the highest revenue products.

      Below is the sample data set to give an indication. We have multiple rows for each product and multiple sales people per product. We also have sales people working on different products. Could anyone advise on how this could be approached?



      ProductSales personRevenue
      Product 1Alex


      Product 1Bob2000
      Product 1Cecile400
      Product 2Alex2000
      Product 2Dan100
      Product 3Bob600
      Product 3Esther650
      Product 3Luke3000
        • 1. Re: Correlation approach support
          Mavis Liu

          Hi Alex,


          Would my attached workbook work?


          So in my example, I have the revenue running along the bottom of the chart. Then going up I have the sales person's TOTAL revenue. (This is an LOD calculation).


          Then I have broken down the scatter by Product (colour) and my by salesperson.


          So now with this scatter, you can see who made the highest total revenue (the higher up they are).

          You can also compare who made the highest revenue per product by looking at the colour. So for example, for product 3 (red), Luke made the highest Revenue and of the 3 sales people who sold that product.





          • 2. Re: Correlation approach support
            Alex Klein

            Mavis, thank you, this might be exactly what I am looking for. How does one create a LOD calculation so that it is available in measures? I googled this but could not find a simple answer,

            • 3. Re: Correlation approach support
              Mavis Liu

              Hi Alex,


              if you right click in the data pane or click on the drop down arrow:




              Create a calculated field and just create the LOD calculation in the editor:




              I've named this LOD calculation as Sales Person Total Revenue, after I click OK it will appear in the data pane under measures:





              Does that answer your question?





              • 4. Re: Correlation approach support
                Alex Klein

                Thank you, this is wonderful! I am very impressed. Thanks again!

                • 5. Re: Correlation approach support
                  Mavis Liu

                  No problem, glad I could help! If you want to learn more about LODs they can be found here: Top 15 Tableau LOD Expressions (Practical Examples)


                  Also useful to note is that there are 3 types of LOD calculations, fixed, include and exclude. The one I showed you was a fixed calculation, in that fix calculation it summed up the revenue per sales person. As this is a fixed calculation, it is unaffected by dimension filters as fixed calcs are before filters in Tableau's order of operations: Tableau's Order of Operations.


                  If you want to include filters in your view, then you should use either an include or exclude calculation. In the previous example, instead of having it as fixed, we could have it as :


                  [Product]: SUM([Revenue])}


                  Include and exclude LOD calculations take what's in the view into account. So in our scatterplot, we have both Product and Sales person. If we exclude/ignore Product, then the sales person would have the total sum of revenue. - Overview: Level of Detail Expressions