6 Replies Latest reply on Jul 13, 2016 12:00 PM by Leonard Culberson

    Selecting the latest date of records received

    Leonard Culberson

      Hello all!

      I have been working with Tableau 9.2.  I have a workbook that shows number of claims received by vendor and the last date(latest date) that claims were received by vendor.

      Here is the calculated fields I have set up for try and achieve this:

       

      MaxdateRecv

      {FIXED  : max([Date Value]) }

       

      MaxdateRecs

      SUM ( IF [Date Value] = [MaxDateRecv] then [Record Count] end )

       

      Results:

      This seems to work, but for only one vendor?  I am puzzled why it doesn't seem to work for both?

       

      Any suggestions will be appreciated!

       

      Thanks!

      Leonard Culberson

      Leonard.Culberson@Wellstar.org

      470.956.6140

        • 1. Re: Selecting the latest date of records received
          Christopher Steinmetz

          Hi Leonard,

           

          The {Fixed : Max(Date)} field is looking at your whole dataset. So it's only going to return values for the latest data in the entire dataset which appears to be 7/10 in your case. Since the other vendor has data only up to 7/3 it won't be picked up.

           

          To fix, simply add the Vendor into your calculation - {Fixed [Vendor] : Max(Date)} so that it evaluates the max data for each vendor. Should get you what you're looking for.

           

          Best,

           

          Jimmy

          • 2. Re: Selecting the latest date of records received
            Leonard Culberson

            Hello Jimmy!

            First, I want to thank you for your reply!  This DID help me some.  The problem now is, that on one of the vendors, the first one listed "NAVICURE" it shows date;  07/03/2016 as the latest date with 403 records.

            I ran a SQL from the data base and it pulls "NAVICURE" with the latest date as:  07/07/2016 with 446 records.  My tableau workbook has been refreshed to pull in the most current data.

            Any ideas?

            thank you again for your help!

            Leonard

            • 3. Re: Selecting the latest date of records received
              Christopher Steinmetz

              Interesting, that sounds more like an issue of data connectivity. To test, I would filter to only that vendor on a new view, right-click and drag [Date Value] to the rows shelf, and choose [Date Value] (Discrete) - second from the top. This should show you all available dates in your dataset and confirm whether that data is even making it into Tableau. 

               

              Just a thought - are you using extracts? If so, when you say you've refreshed the workbook, have you also refreshed the extract?

              • 4. Re: Selecting the latest date of records received
                Leonard Culberson

                Hey!

                You know, I will try this.  Yes, I am using extracts.  When I "refreshed", I went to Data Source tab and clicked on "REFRESH".

                I can understand what you are saying that maybe the data was not making into tableau, but why would the SQL pull vendor "RelayHealth" 07/11/2016 with 1683 records(as being the latest date and record count), and this is also what shows in tableau, but SQL pulls "Navicure" 07/07/2016 with 446 records(as the latest date and rec count) and tableau shows 07/03/16 with 403 recs?

                I changed the Data Source connection to LIVE, instead of Extract.  The record totals in Tableau for vendor NAVICURE shows 07/07/16 with 446 records!  If I change data Source back to an EXTRACT, vendor NAVICURE shows 07/03/16 with 403 records??

                I am puzzled by this.  I have spoken to someone here and we are going to look at this.  Can not understand why a LIVE connection would show a more current date than the EXTRACT.

                We are going to look at this and see if we can figure something out.

                Thank you again for your help!

                Leonard

                 

                • 5. Re: Selecting the latest date of records received
                  Christopher Steinmetz

                  Happy to help!

                   

                  For a bit of clarification - an extract is a snapshot of your data at a given point in time. It rebuilds the data in a way that's easier for Tableau to read, so it ends up helping in terms of performance, but at the cost of a live connection to the data. If you're using Tableau Server, you can have the server refresh the snapshot of the data automatically on a given schedule, so each morning you would be able to have the latest data as of the time of refresh. You can also refresh from the Desktop tool by right clicking the data source, hovering over Extract and choosing refresh (which is different from refreshing the data source . In this case, refreshing the data source just goes and asks the same extract for the data again as opposed to going back to the database to build a new extract with updated data).Screenshot (180).png

                   

                  Best,

                   

                  Jimmy

                  1 of 1 people found this helpful
                  • 6. Re: Selecting the latest date of records received
                    Leonard Culberson

                    Hello Jimmy!

                    This seems to be what I was looking for!  This did change my counts and showed me the latest date.

                     

                    Thank you again for your help!

                    Leonard

                    1 of 1 people found this helpful