4 Replies Latest reply on Sep 21, 2017 6:32 AM by Vanessa Zorgia

    FIXED Level of detail expressions

    Vanessa Zorgia

      Hello everyone,


      The data I have are names, ranks and durations of contracts for each name. I want to calculate the total duration per name and rank. I tiried the FIXED function as you may see in the picture but the results are not correct. How can I calculate correctly the sum of durations for each name per rank(description)?


      Thank you,Vanessa


        • 1. Re: FIXED Level of detail expressions
          Jim Dehner

          Hi Vanessa


          It looks like the LOD is aggregating over a number of records - I see that Duration is a calculated field - are you picking up multiple records with that caclutaion and aggregating them with avg or max or something else -

          if so try taking repalcing the Sum(duration) in your LOD expression with the detailed forumla in your Duration formula

          Good luck


          Let me know if this helps

          • 2. Re: FIXED Level of detail expressions
            Vanessa Zorgia

            The Duration field is a DATEDIFF in months between two dates. I tried to add it in the LOD expression and same result.

            • 3. Re: FIXED Level of detail expressions
              Jim Dehner

              Vanessa - this would be easier if you shared your workbook as a twbx file with the data included - or at least a protion of the data

              The way the LOD expression works is that it creates a permutation of the the 2 dimensions that precede the colon (:) and then aggregates them by what follows the colon - in your case you are creating permutations of Name and Rank - then you are Summing the "Duration(s)" at that level -

              You then put the cacluation on the vis and it will be aggrgated again if there are multiples at that point - you have made it discrete and it is a little difficult to see what is going on from the image


              • 4. Re: FIXED Level of detail expressions
                Vanessa Zorgia



                I cannot upload the data because they are company's property so I cannot upload a workbook. The datasources are multiple tables from a database and are joined with a primary key between them. The Name and Rank are from different tables and duration is calculated from dates given in also different table.How can I make tableau not aggregate the total of durations (Years in Rank)?