6 Replies Latest reply: Nov 16, 2015 9:01 AM by Pablo Romaniuk RSS

    Continuous Line Chart

    Daniel Mann

      Good Morning,

       

      How do I create a line chart that will show months and years on the x-axis?

       

      I want it to run Jan - Dec 2014 and the same for 2015, but I can only seem to make a graph that has the Jan - Dec axis, but then 2 lines for the year.

       

      Thanks

       

      Dan

        • Re: Continuous Line Chart
          Sunny Talwar

          I am guessing that you have two dimensions in your chart- > Month and Year? Try using this as your dimension -> Month & ' ' & Year

            • Re: Continuous Line Chart
              Daniel Mann

              Hi Sunny,

               

              Thanks that worked apart from the chart is now running in an incorrect order.

               

              I have Jan - Dec 2015, Jan - Dec 2014

               

              I want to have it the opposite so that Dec 14 joins to Jan 15.

               

              I have tried to use the sort, but nothing seems to work.

               

              Any ideas?

                • Re: Continuous Line Chart
                  Sunny Talwar

                  Change the dimension to this:

                   

                  Date#(Month & ' ' & Year, 'MMM YYYY')

                  • Re: Continuous Line Chart
                    Casey Burrow

                    That's because this Month & ' ' & Year is interpreted as text, not a dual date. You could try the suggestion from Sunny T using the Date#() function but I think you might get errors because you will be trying to assign a date value and only specifying a month and a year (with no day). If you are going to use that approach (instead of MonthStart() or MonthName()) then I would suggest this:

                    Date( Date#(1&' '&Month&' '&Year,'D MMM YYYY'), 'MMM YYYY')

                • Re: Continuous Line Chart
                  Casey Burrow

                  I would do it via a Month_Year field. So if you have a master calendar with individual dates you could create a field like this using the MonthName function:

                  MasterCalendar:

                  ...

                  Date,

                  MonthName(Date) as MonthYear,

                  Year(Date) as Year...

                   

                  Then you could have a line chart with MonthYear as the dimension and it would still respond to selections in the Year, Month, Date fields. Something like this:

                  2015-11-16_8-53-23.jpg

                  EDIT: in my App the MonthYear field is just named Month (x-axis in the picture). MonthName() by default will have this format: 'MMM YYYY'. I changed mine to 'MMM-YY' format.

                  • Re: Continuous Line Chart
                    Pablo Romaniuk

                    Si Quieres que te Quede Como en El Gráfico solitario deberías dejan en Dimensiones mes y año por Separado.