2 Replies Latest reply on Oct 21, 2013 5:06 AM by Jonathan Drummey

    sort count ascending in line graph

    Syed Shah

      Hi All,

       

      I am facing two issues in my graph

       

      1) I have a measure called tweets count. I have calculated it by taking countd of all tweets and it is a calculated field. I am showing it in my line graph. The line is giving me two sort options. one if sort by data source and the other is manual sort. Why can't I see a simple sort ascending or descending option

       

      2) I am showing Dates and then hours in my line graph as dimensions. When we move from one day to another day, there is a break in the line graph. Can someone please guide me how to remove the break when the graph goes from hours of one day to another day. I am attaching a screen of my graph as a reference

       

      ArifCapture.PNG.png

        • 1. Re: sort count ascending in line graph
          Shawn Wallwork

          What's the calculation in the Tweet Count? Does it involve a secondary data source? If so that's your problem, you can't sort on a secondary data source.

           

          --Shawn

          • 2. Re: sort count ascending in line graph
            Jonathan Drummey

            Tableau doesn't have support for ascending/descending sort of measures, it sorts dimensions based on a measure. For measures there are the data source order or manual sort options as you saw. What Shawn was referring to is that you can't sort a dimension based on a measure from a secondary data source.

             

            Since you're talking about wanting to sort the Tweet Count and it's being used to draw a line chart, there's a different way to go about this. You have the Tweet Count in the view as a discrete (blue) pill, if you change it to continuous then you will have an axis and can choose to have the axis sorted ascending or descending.

             

            As for the dates, you have year, month, day, and hour in the view as discrete pills, which generate headers. If you want to have a continuous axis showing the hour, then you're going to want the date value (also called datetrunc) version of Hour, to get that click on the Hour pill and choose this:

             

            2013-10-21 08_03_27-Tableau - Book2.png

            That will turn it into a green pill with a continuous axis. You'll still have a lot of extra headers, though, with vertical lines breaking the mark line, to connect the lines you'll need to get rid of as many blue pills as you need.