3 Replies Latest reply on Jul 19, 2018 9:18 PM by Naveen B

    Sorting Month+Year and Quarter+year

    Shariq Mohd

      Hi All,

       

      I created this calc in which i have created a string from order date however i am not able to order from smallest to largest for e.g when i select monthly from Choose trend parameter it should Jan2017 to Dec2017 and same when i select quarterly it should should Q12017 to Q42017. This should also work if more years are selected for e.g. 2016 and 2017 etc. I am attaching my sample workbook here in which i have emulated my problem using superstore data.

       

        • 1. Re: Sorting Month+Year and Quarter+year
          Chris McClellan

          Unfortunately I don't have time to create the solution now, but the blocker is that the calculated field is a string, so it's sorts it as a string.

           

          You need to create the values as a date (hopefully by formatting the date in different ways) and then it will sort properly.

          • 2. Re: Sorting Month+Year and Quarter+year
            emily law

            I'm not entirely clear on what you're looking for, are you looking on how to sort your graph by quarter and month using a timeline scale?

            If so, it's not necessary to use your string calculation but to place your "order date" in the column shelf and sales in the row shelf. Make the order date 'continuous' meaning it's a green measure. This will make it on a timeline. From there I created filters for you to select the year, quarter or month. See attached on sheet 3.

            • 3. Re: Sorting Month+Year and Quarter+year
              Naveen B

              Hi Shariq,

               

              Click on the Trend Calc and select sort

               

               

              Select ascending and select sort using field, select date from drop down and select aggregation as minimum

               

               

              Click OK  you can see the sorting happen correctly

               

              Monthly View:

               

              Quarterly View:

               

              Hope this helps kindly mark this answer helpful/complete so that it will others