2 Replies Latest reply on Mar 29, 2016 1:29 PM by Rody Zakovich

    LOD calculation with date filter not working

    casey lee


      I'm trying to product  # of CoolingDegreeDays+HeatingDegreedays from the below report.

      I used LOd calculation


      However, its calculating by all time period instead of by date filter ...


      The first screenshot shows calcuation1 value should be 5 where as its 1828.

      But I removed date filter = Localtime and Sum of those two value equals to 1828..

      As a result, I realized that my date filter is not working..

      Could you please help?


        • 1. Re: LOD calculation with date filter not working
          Sharad Adhikari



          I would suggest you to try Include instead of fixed. Fixed lod is calculated before dimension filters.


          Filters and Level of Detail Expressions




          • 2. Re: LOD calculation with date filter not working
            Rody Zakovich

            Hello Casey,


            What you are seeing is a result of the FIXED LoD expression.


            FIXED LoDs are calculated prior to regular filters, i.e. it is calculating this before the  Local Time filter is applied (Which is why you see the same results before/after)


            Here are some options


            1. You can do as Sharad suggested and use Include/Exclude LoD


            2. You can add the Local Time filter to context (Fixed LoDs are computed AFTER Context Filters)


            3. Since all of you Dims are in the viz/worksheet, and you want it to adjust based on filters, you can use Table Calcs instead of LoDs. This method could yield better performance as it would happen post DB/Datasource query from within Tableau on a limited number of dims.


            If you run into any problems, feel free to ping me.