3 Replies Latest reply on Sep 3, 2013 3:08 AM by Matt Morgenroth

    STR function and location

    Egor Larin

      Hi there,

      I have got a problem with using STR function in my calculation.

      Problem with float standart of data.

      After using STR function on float measure, my lovely russian comma transform to international dot.

      location error.png


      What i'm doing wrong?



        • 1. Re: STR function and location
          Tracy Rodgers

          Hi Egor,


          One possibility is it is a result of what the operating system's formatting is set to.



          • 2. Re: STR function and location
            Egor Larin

            Hi Tracy,

            I've checked all my format settings in operating system and it is russian

            • 3. Re: STR function and location
              Matt Morgenroth

              TL;DR: STR() returns the format of the underlying database.  Database formatting change is required to see Russian formatting in result of STR()


              Desktop regional settings format the visible final query result, so regardless of the database/OS settings that affect formatting, Desktop has the final say.


              However when STR() is used, it does not pass the Desktop-formatted measure.  It merely runs the same query, casting the field as a STRING.  Nowhere in this operation does Tableau have the opportunity to format the original MEASURE.

              When STR() returns, it has already been made a string and is no longer able to be modified in Desktop using the formatting rules applicable to continuous fields.


              Using a reproduction that has Excel as the data source, I can toggle the formatting decimal>comma>decimal>comma, by toggling the Region and Language Format setting between English (United States) and Russian (Russia).

              This affects the formatting of the final STRING in the repro workbook because it is effectively toggling the formatting of the underlying database (Excel).  It will only work for your scenario if the database is changed to the desired format.