2 Replies Latest reply on Nov 21, 2018 12:51 PM by Brian Hangartner

    Quarter Datepart Calc Not Working Properly

    Brian Hangartner

      In the attached file I have some data I am grabbing from Last.fm. I have a formula that converts the time from the data source (Date and TIme) to Mountain time (Date and Time MT).

       

      I started getting some weird results using the converted time formula and as I dug in it appears to me that the datepart function is not calculating properly.

       

      The first column is using the standard Quarter option on a date field and it shows Q1, which is correct.

       

      The next 3 columns are all the exact same formula. (Originally I thought the Replace References I did might have messed something up so I repeated the formula)

       

      datepart('quarter',[Date and Time MT])

       

      The result from the above formula is a 2 for the first 3 lines of data even though the date is 3/31/2018 and the standard time option shows it as Q1.

       

      Any help would be appreciated.

       

      I am using Tableau 2018.3.

       

      Brian