1 Reply Latest reply on Feb 21, 2013 3:43 PM by Shawn Wallwork

    Calculation Context

    Tableau Developer

      Dear Team,

       

      How do you force tableau to evaluate a measure based on a particular dimension, even when the dimension is not part of the table.

       

      Issue: Compliance is calculated at a Project level, but when aggregate compliance at Region or Sub-Region the compliance needs to roll up.

       

       

      Attached tableau File.

       

      Sample Data:

      Region      Sub Region     Project     EstimatedSubmissionDate

      US              North               P1             01/12/12

      US             North             P1             02/12/12

      US              South             P2          31/12/12

      US              South             P2          01/01/13

      US              East                P3          01/01/13

      US              East                    P3           02/01/13

      US              West            P4           02/02/13

      US               West            P4           03/02/13

       

      Compliance Calculation = iif(datediff('day',[MaxDate],Today())<35,"Compliant","Non-Compliant")

      MaxDate = Max()

       

      Expected Result.

       

      Region     #of Projects     ComplianceProjects     Compliance %

      US                  4                            3                        75%

       

      Hierarchy - Region>Sub-Region>Project

       

      On Drill down

       

      Region     Subregion    #of Projects     ComplianceProjects   Compliance%

      US           North               1                        0                            0%

      US           South               1                        1                           100%

      US           East                 1                        1                            100%

      US           West                1                         1                           100%

       

       

      Thanks in advance for your help.

       

        • 1. Re: Calculation Context
          Shawn Wallwork

          Hi, we appreciate that you've taken the time to explain your issue, and posted a workbook. But the workbook you posted doesn't include any data (twb). It needs to be a package workbook (twbx). Post back and I'll take a look for you.

           

          --Shawn

           

          PS: I'm not sure your user name will work for you long term, but that's up to you of course.