1 Reply Latest reply on Dec 19, 2016 12:37 PM by Shawn Wallwork

    Performance Question

    Matthew Risley

      Low-level priority, curiosity question here

       

      I have a date field in my data source (Called 'Month'... Slightly confusing ) that is a string with year and month in one. Example:  201503

       

      I am using a DATEPARSE() to turn this into the correct date values I need.

       

      Currently I am creating a separate Year and Month string and then putting them together into one calculated field so other users see the progression.

      into

       

      is there a performance increase when combining this into one calculated field?

       

      It's such a small data set that there is no tangible difference in performance recording. I'm working with less than 200 records. But if I were working with 1 milllion +, what would be the best option?

       

      What is best practice here? This doesn't necessarily need to pertain to date calcs either.

       

      Thanks,

      --Matt

        • 1. Re: Performance Question
          Shawn Wallwork

          This is just a guess, but....

           

          DATE(LEFT([MONTH],4) + '/' + RIGHT([MONTH],2) + '/01')

           

          Will give the best performance. Of course the sooner you can get from sending Alpha-numeric data queries, to sending numeric data, the faster everything gets.

           

          Changing the string date Month date from 201503 to 2015-03 in the database would then allow you to 'split' the fields into year and month in Tableau's new data connection process, and make them numeric. Then you can deal in numbers from the start:

           

          MAKEDATE([Year], [Month], 1)

           

          That'll be the most performant.

           

          --Shawn

          1 of 1 people found this helpful