4 Replies Latest reply on Jun 30, 2015 5:44 AM by Sam HATAMI

    Hi does anyone know how to use EDATE function in Tableau ?

    Sam HATAMI

      I need to add months left to my date to calculate the expiration date, for example on 30/06/2015 I will still have 3 months, I want the calculation to give me 30/09/2015.

      The solution in Excel is EDATE(30/06/2015,3)

       

      Many thanks

        • 1. Re: Hi does anyone know how to use EDATE function in Tableau ?
          kumar.c

          Hi Sam,

           

          Try below formula.

           

          DATEADD('month',3,max([Order Date])).

           

          Hope this will work.

          1 of 1 people found this helpful
          • 2. Re: Hi does anyone know how to use EDATE function in Tableau ?
            Rody Zakovich

            Hi Sam,

             

            Depending on your situation, you may want to use Kumar's method of

             

            DATEADD('month',3,max([Order Date])), but this is a regular aggregate, so it can limit what you want to do.

             

            You can also do

             

            DATEADD('month',3, [Order Date]), which will give you more flexibility in your Viz, and other calculated fields.


            If you need to add 3 Months to the last date of an individual Dimension (like customer), then I suggest using an LoD (If you are on V9)


            DATEADD('month', 3, { FIXED [Customer Name] : MAX([Order Date])}) , you may want to play around with using FIXED, INCLUDE or EXCLUDE, depending on the Viz, and how you want Filters to interact with it.



            There are 3 different keywords

            Fixed : Limits the level of detail of the aggregate expression to only the dimensions listed in the dimensionality expression. I will cover the interaction with filters towards the end of this post.
            Include : Defines the level of detail for the aggregate expression by combining the dimensions listed in the dimensionality expression with dimensions in the sheet. It is great when you want to calculate at a fine level of detail in the database then re-aggregate and show at a coarser level of detail in your visualization and/or when you want your calculation’s level of detail change when you drill down or add more dimensions to your Sheet.
            Exclude : Defines the level of detail for the aggregate expression by removing the dimensions listed in the dimensionality expression from dimensions in the sheet. It is great for ‘percent of total’ or ‘difference from overall average’ scenarios. Can be considered as the written/textual representation of features like Totals and Reference Lines.

             

            Filters in Tableau

            Hope this helps.

             

            Regards,

            Rody