2 Replies Latest reply on Jan 9, 2018 2:15 PM by Teju pamarty

    Only Display Latest Entry For each Location

    Carl Shatraw

      I am somewhat new to Tableau.

       

      I'm trying to make an inventory dashboard more or less...

       

      I need to only display the latest order for each location. This would include only the products in the latest order on the latest date.

       

      This is updated/refreshed daily.

       

      Raw Data (MS Access)

      DateLocationProductInventory
      1/1/18New YorkA5
      1/1/18New YorkB6
      1/1/18New YorkC7
      1/2/18New YorkC10
      1/2/18New YorkD10
      1/5/18BostonA7
      1/5/18BostonB8
      1/5/18BostonC9
      1/6/18BostonD15
      1/6/18BostonE14
      12/15/17DetroitA5
      12/15/17DetroitB6
      12/15/17DetroitD7
      12/19/17DetroitD10
      12/19/17DetroitA8

       

        Desired Output

      DateLocationProductInventory
      1/2/18New YorkC10
      1/2/18New YorkD10
      1/6/18BostonD15
      1/6/18BostonE14
      12/19/17DetroitD10
      12/19/17DetroitA8
        • 1. Re: Only Display Latest Entry For each Location
          Matthew Theis

          Hey Carl Shatraw  Including a workbook would assist here greatly. 

          I think you might be looking for a LOD expression.  Try {fixed [location]:max[date]}  You could then pull this into a column shelf which will return the latest date per each location.  Then pull in measures that you want to report on for that date.

          Did this help?

          Best,

          Matthew

          2 of 2 people found this helpful
          • 2. Re: Only Display Latest Entry For each Location
            Teju pamarty

            Hi Carl, you can do this by creating a calculated field.

            1) Create a calculated field similar to the following : { FIXED [Location]:MAX([Date])} = [Date]

            2) Place the calculated field on the filter shelf and select "True" values.

            3) Right click and drag the Date on to the rows shelf and select discrete. Drag the location, product and inventory too on to the rows shelf.

             

            This should give you the required output. Let me know if you have any more questions.

            1 of 1 people found this helpful