In my project, I have faced a requirement of sorting month in charts.

Let’s create a simple report to demonstrate this. For this example we will be using two objects. in report

1. Month Name

2. Number of incident

When we create the column chart  using above objects as shown below :

Month.PNG

Requirement : Sorting Month Name in Chart.

Create a variable in report.

Month_Number:-   If[Month]=April Then “4” ElseIf[Month]=May Then “5” ElseIf[Month]=June Then “6” ElseIf[Month]=July Then “7” Else [Month]

Step 1: Assign Data in chart section

               Select below values

Month.PNG

Step 2:

Hide ‘Month Number’

Month.PNG

Step 3: Right click on the chart and select ‘Sort‘ option

Sort -> Manage Sorts ->Add

Month.PNG

Add Month Number and select order  as Ascending

You can then see the chart output as shown below :

Month.PNG

Hope this helps 🙂

Regards,

Pranay

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

  1. Neil Mitchell-Goodson

    Another option is to use an Alerter / Conditional formatting to replace the Month Number with the Month Name – this way you don’t need to sort it as it respects the underlying sort of the month number, and you don’t need to hide any additional objects.

    (0) 
  2. Mark Prosser

    Yet another option is to create a Month Date object:

    =ToDate([Month_Number]+” 012015″;”Mmmm ddyyyy”)

    You can then use this in your chart and format the object to display the month name.

    (0) 
  3. Ramanaidu Kolasani

    Hi Pranay/Mark/Neil,

    Thanks for your information.

    How do we replicate this procedure on pie chart ?

    Is it possible ?

    We heard that for pie chart sort option will not show up because it’s a circular one and it doesn’t matter for it to sort in anyway, is this correct ?

     

    (0) 

Leave a Reply