6 Replies Latest reply on Apr 15, 2018 5:49 PM by Natasha John Williams

    FIXED LOD not ignoring Dimension Filter

    Natasha John Williams

      Fixed LOD Calculation not ignoring Dimension Filter

       

      Hi guys,

       

      I just want to know why my Fixed LOD calculation for finding the Average for Minutes of Delay doesn’t ignore the Airport Name dimension filter in the view.

       

      But the official Tableau documentation on FIXED LOD mentions the below logic:

       

      “FIXED calculations are applied before dimension filters, so unless you promote the fields on your Filter shelf to Improve View Performance with Context Filters, they will be ignored.”

       

      My FIXED LOD calculation is as follows:

       

      { FIXED [Carrier Name] : AVG([Minutes of Delay]) }

      1.png

       

       

      But when I try to use an Airport Name Filter, the FIXED LOD doesn’t ignore the filter and gives me a different figure.

      2.png

      The Airport Name filter am using is  Baltimore/Washington International.

       

      Can someone please tell me why is the FIXED LOD behaving like this when it should ignore Dimension filters according to Order of Operations. Or am I missing something here.

       

      Thanks.

       

      Natasha

       

      Note: Please see the attached images and the dataset for further information. Also, I am using Tableau 10.3.9 Desktop Version.

        • 1. Re: FIXED LOD not ignoring Dimension Filter
          Jeevan Krishna

          The way you understood LOD's are bit different.

           

          Its true that the LOD's are not affected by other dimension filters but you need to understand that the dimension filters do filter out the dimension on which you calculated your LOD.

           

          To understand this, looking at your example at a carrier name level instead of aggregate.

           

          LOD Delays on Carrier Name level and you can see the grandtotal using average matches with what you have

           

           

          Comparing the same with avg delays without any LOD calculation

           

           

          Since there is no other dimension, other than carrier name (on which your LOD is calculated), both the calculations will match exactly same.

           

          But once we introduce airport name as a filter, we will see a considerable difference

           

           

          You can see that the values from LOD calculation stays the same but the other calculation differs as per the airport selection.

           

          The statement "FIXED calculations are applied before dimension filters, so unless you promote the fields on your Filter shelf to Improve View Performance with Context Filters, they will be ignored." means the calculations are dependent only on the dimensions used in the LOD calculations. But this doesn't mean the dimension filters do not affect the no.of dimensions in the view and thus affecting overall averages.

           

          Hope this helps.

          • 2. Re: FIXED LOD not ignoring Dimension Filter
            Zhouyi Zhang

            Hi, Natasha

             

            In your case, you need create another calculation for average of each carrier as shown below

             

             

            an updated workbook attached for your reference.

             

            Hope this helps

             

            ZZ

            • 3. Re: FIXED LOD not ignoring Dimension Filter
              Branden Kornell

              Jeevan's answer is correct. They key is that the FIXED LOD is being calculated first, on all the data, and then part of the data is filtered out when the viz is constructed.

               

              It's helpful to look at this page, to see what order things are done in.

               

              Tableau's Order of Operations

               

              To correct your issue, right-click on your filters in the Filter shelf and select "Add to Context". Context filters are applied before FIXED LODs are calculated.

              • 4. Re: FIXED LOD not ignoring Dimension Filter
                Natasha John Williams

                Hi Jeevan,

                 

                Thanks a lot for your beautiful explanation. You were right that I had not understood how LOD expressions work exactly especially FIXED which is more common than others. The dimensions are also an important thing to take into account when we are using the same in our calculation.

                 

                It was just a couple of Tableau users whom I work with had confused me into believing that no matter what LOD Fixed will never change by the introduction of dimensions in filters or the view.

                 

                If there was a better official explanation about the same topic in the official Tableau documentation with the right examples then Tableau users will not get so confused. But luckily we have this Tableau Community Forum where we can help each other when in need.

                 

                Coming to the figure of 2438 with just the Carriers and 2840 with Airport Name on the filter shelf. It makes sense why the number changes because there are 3 carriers Alaska, Hawaiian and Virgin which do not fly to Baltimore/Washington International Airport.

                 

                Cheers,

                 

                Natasha.

                • 5. Re: FIXED LOD not ignoring Dimension Filter
                  Natasha John Williams

                  Hi ZZ,

                   

                  Thank you for the answer and that was a clever trick to use FIXED calculation again to show the same number on the view without having to add the filter to the context.

                   

                  Cheers,

                   

                  Natasha

                  • 6. Re: FIXED LOD not ignoring Dimension Filter
                    Natasha John Williams

                    Hi Branden,

                     

                    Thank you for your answer. I did use the Context filter work around to get the right figure which I was after. The only thing confused me was the work around with LOD Calculations, Order of Operations Logic and Dimension Filters. Now everything is clear for me.

                     

                    Cheers,

                     

                    Natasha