4 Replies Latest reply on Jul 24, 2018 4:55 PM by Helen Wang

    How to put data from different data source into a fixed calculation?

    Helen Wang

      Hi all,

       

      I need to create a calculation like this:

       

       

      Extended amount

      zn(SUM([Sheet1 (ACOPs file uploaded to Tableau)].[ACOPs per unit]))*zn(sum([Sell Thru Qty]))

       

      This worked, but the extended amount total is not correct, so i want to proceed with the fixed calculation:

       

      First I just wrote the formula with fixed() function to add up to the totals according to the right level: I just type in the valuable name and click the one that is popped up as system default:

      { FIXED ATTR([Sheet1 (ACOPs file uploaded to Tableau)].[Account]),ATTR([Sheet1 (ACOPs file uploaded to Tableau)].[Part Number]): SUM([Sheet1 (ACOPs file uploaded to Tableau)].[ACOPs per unit])* SUM([Sell Thru Qty])}

       

       

       

      Tableau told me the error is that :"Level of details expressions cannot contain table calculation of the ATTR function  "

       

      So I have taken out the ATTR() and Tableau told me

       

       

       

       

      { FIXED [Sheet1 (ACOPs file uploaded to Tableau)].[Account],[Sheet1 (ACOPs file uploaded to Tableau)].[Part Number]: SUM([Sheet1 (ACOPs file uploaded to Tableau)].[ACOPs per unit])* SUM([Sell Thru Qty])}

       

       

      "All fields in a level of detail expression must come from the same datasource"

       

      Please help!

       

      Thanks