3 Replies Latest reply on Feb 24, 2016 7:24 AM by Joe Baker

    LOD With Line?

    Joe Baker

      Hi Guys,

       

      So trying to accomplish LOD with Weighted Average measure and a line chart to show how Sub-Category relates to the overall Category, similar to below.

       

       

      But when I select "All" in Sub-Category the Wght Avg Sales line and the LOD Category line should overlap/be the same, but they are different.  Any ideas on what I'm missing here?

       

       

      LOD Weighted Average? Dave Rawlings Roland Rust

        • 1. Re: LOD With Line?
          Dave Rawlings

          Unfortunately I can't open your file as I'm only running 9.0

          • 2. Re: LOD With Line?
            Ben Neville

            Hi Joe - you're very close. The only issue is that you've fixed your LOD calc at the Order Date/Category level. This makes a lot of sense, but you need to be aware of what you are telling Tableau to do. In this case, you are telling Tableau to compute the number at the UNIQUE Order Date/Category intersection. That is the intersection of every unique date in the data and every unique category. To clarify, this is going to be computed at the day level, not the month level which is being shown in your visualization.

             

            To make these 2 match, try creating a Month Truncated Order Date calculation:
            DATETRUNC('month', [Order Date])

             

            Now just replace [Order Date] in your LoD calculation with [Month Truncated Order Date], and the lines should match.

            1 of 1 people found this helpful
            • 3. Re: LOD With Line?
              Joe Baker

              Absolutely fantastic!

              Thanks you Ben!