2 Replies Latest reply on Oct 9, 2012 4:07 PM by Barry Town

    calculated field to show trend as a single value

    Barry Town

      hello everyone,


      Please excuse me if my question is ignorant or has been answered before. I am learning as I go.


      I would like the ability to look at a set of customers, and determine whose sales are increasing or decreasing over time. I know that I can do this easily for an individual customer by throwing their sales on a timeline and adding a trend line. But what I want is to see a list of, say, the top 20 most positive (or negative) trending customers, in a ranked bar chart. I could then click on a customer's bar to view their timeline.


      I tried a few things using table calculations, but they were all too clunky and didn't really work. I think I'm on the wrong track, and that this type of thing must be easier.


      Any help would be greatly appreciated. My coworkers and I all love Tableau!


      thank you,



        • 1. Re: calculated field to show trend as a single value
          Tracy Rodgers

          Hi Barzel,


          Would using two sheets and an action work. I've attached a sample workbook showing this.


          Hope this helps!



          • 2. Re: calculated field to show trend as a single value
            Barry Town

            hi Tracy,


            Thanks for your reply and example.


            In sheet 1, you have the states ranked in descending order by sales. I am looking to calculate a different measure, which might be difficult to do. I need to see the overall sales trend over time, represented as a single number.


            It's difficult for me to explain, because I do not know how to calculate it. The best analogue I can give is the trend line. For a downward-sloped trend line, I would want to see a negative number; if upward, a positive one. The size of the number would indicate the strength of the trend. The hard part for me is that I want this value to take into account every data point (in this case, months) in my timeline - which I believe is what the trend line does. I need this because we can have cases where the closing numbers are higher than the opening ones - even though the overall trend is downward.


            I want to be able to rank my customers by "steepest downward trend", for example.


            Please let me know if that explanation makes sense, and thank you for your help!