4 Replies Latest reply on Mar 27, 2018 12:04 PM by Michael Byars

    I have a calculated field that is not refreshed in graph after extract refresh

    Roberto Morales

      I have a numeric field called GOAL DB - it can contain numbers like 0, 3, 10, and sometimes it has odd numbers that are intended to be codes for something else, for example -0.00001000 is a code for 'n/a'. we have chosen to set those coded numbers to 0. i have a calculated field to do this called GOAL Graph and it looks like this:

       

      CASE [GOAL DB]

        WHEN -0.00001000 THEN 0

        WHEN -0.00002000 THEN 0

        WHEN -0.00003000 THEN 0

        WHEN -0.010 THEN 0

        WHEN -0.0000100000 THEN 0

        WHEN -0.000010000 THEN 0

        WHEN -0.0000300000 THEN 0

      ELSE [GOAL DB]

      END

       

      and all this works - i graph it and the values are correct and properly placed, scale is good - everything works are expected. the issue i am having is after an extract refresh, and only after an extract refresh. this happens on desktop and on server.

      the problem behavior is this:

      after the extract refresh the graph will ignore the calculation - as if it simply wasn't there, and use the raw GOAL DB value. so for a particular record the value will be -0.0000100000, and the graph will plot GOAL Graph as -0.0000100000 instead of what should be the calculated result, 0.

       

      to 'fix' this error i have to go to the page with the graph, select the GOAL Graph calculated field, select 'Edit', and finally make any change at all to the calculation. i like the calculation as is, so i just add a space somewhere. Tableau revalidates the expression and makes available the "Apply" button that was previously grayed out. once i click on Apply or Ok, tableau regraphs using the calculated result. it's very frustrating. i have tried different calculations with same result.

        • 1. Re: I have a calculated field that is not refreshed in graph after extract refresh
          Roberto Morales

          i should add that it appears to not be a graphing issue per se - i also use the calculated field GOAL Graph in a tool tip and the same behavior occurs there as well: after extract refresh GOAL Graph in tool tip returns raw GOAL DB number until i manual touch GOAL Graph, which seems to force tableau to run thru the calculation.

           

          thanks for any help

          • 2. Re: I have a calculated field that is not refreshed in graph after extract refresh
            Amber Eadie

            I see you never got an answer, were you able to solve this issue?

            I am having a similar issue. I have a calculated field with the function "TODAY()" and a second one with the function "NOW()". Both have their own parameter using a list that I have populated using the "Add from Field" button so that the parameter always has the result of the calculated field. I then use the parameter in my where clause in my custom SQL so that I always pull data between the current date at 12:00am to the most current time on that day (i.e. 9:00pm). My problem is, even when I refresh the extract the calculated fields still show the old timestamps from when I set them up. The only way to fix this I found is to recreate the parameters and then preform the extract again.

            How am I supposed to get the query to return the current day's worth of data without having to recreate parameters? Most of the users will be viewing this report on the Tableau server and I would hate to have to instruct them on creating the parameters and performing an extract refresh every time they want to view the report.

            • 3. Re: I have a calculated field that is not refreshed in graph after extract refresh
              Cindy Zhou

              I had the similar issue. I had a calculated field converting a field from UPPER CASE to lower case. I had the live connection to the database at first, and the calculated field works fine. When I extracted the data, the calculated filed start to look odd(I have the CF as a filter as well). The UPPER CASE are still UPPER CASE(except one value). I find it very odd.

              I think it's a Tableau bug. I modified my calculated filed(same logic!!!) and it looked.

               

              Cindy

              • 4. Re: I have a calculated field that is not refreshed in graph after extract refresh
                Michael Byars

                It is sad that four years later this bug has not been squashed.  I have calculated field with the following code.

                 

                DATETIME(INT(FLOAT([MX Out Local Date Time])*(1440 / 15)) / (1440 / 15))

                 

                It works great until I refresh the extract.  All I need to do is add/subtract a space anywhere in the code and it works well.  This is very frustrating because it keeps me from being able to use an auto-refresh and/or a published data source.   

                 

                Has anyone found a true solution to this issue? 

                 

                Thanks.