2 Replies Latest reply on Aug 2, 2017 9:28 AM by Tilen Medeot

    Reporting on Salesforce Stage Duration in Tableau

    Tara Miner

      We are in the process of integrating Tableau with Salesforce (Enterprise edition).  We have two Tableau reports in which we need to report on time in opportunity stage. The first is for open opportunities we need to report on total duration in current stage. The second report reports on the average duration of opportunities (open and closed won) per stage. In salesforce reporting I am able to do so by leveraging the stage duration field in the opportunity and opportunity history objects. However we are not able to query these fields from Tableau as the stage duration field is hidden and only available to SFDC standard reports.  I believe that we will have to implement a custom solution to be able to report on stage duration such as the following:  Tracking stage duration | Mike Chale

      Has anyone encountered this problem and what solution have you implemented? 

        • 1. Re: Reporting on Salesforce Stage Duration in Tableau

          Hey Tara,


          I moved this to our Salesforce portion of the Community where hopefully it is more likely to receive a response.


          Thank you,



          • 2. Re: Reporting on Salesforce Stage Duration in Tableau
            Tilen Medeot

            Hi Tara!


            I tried to solve Stage Duration tracking with this solution:

            1. I used table "Opportunity History" from Salesforce

            2. I have created a field which calculates the difference between the [Created Date] and [System Modstamp] from "Opportunity History" table.

            DATEDIFF ('second',[Created Date],[System Modstamp])

            3. Because you can have multiple records (Opportunity History ID) for a single Opportunity (Opportunity ID) I have created a second calculated field which sums up the values from previous (ad2) calculated field for every [Stage Name] of a single [Opportunity ID]. I used LOD (Level Of Detail) Expression to create this field

            {FIXED [Opportunity ID], [Stage Name] : SUM([Time Difference])}/86400

            I hope you find this solution helpful.