Sort on Report Chart

Hi

have setup a view which gives a breakdown of orders per month, struggling to get it sort on the month name or no:



any ideas?

Parents Reply Children
  • 0 in reply to dskantor

    i want to be able to sort the graph by month at the moment its sorting as follows:



    this is an example view im working with:

    SELECT
            YEAR(Q.quot_opened) AS orde_year,
            MONTH(Q.quot_opened) AS orde_month_number,
            COUNT(*) AS total_quotes_count,
            SUM(Q.quot_nettamt) AS total_quotes_value
        FROM vQuotes Q
        WHERE YEAR(Q.quot_opened) = YEAR(GETDATE())
          AND Q.Quot_Deleted IS NULL
        GROUP BY
            YEAR(Q.quot_opened),
            MONTH(Q.quot_opened),
            DATENAME(MONTH, Q.quot_opened)

  • 0 in reply to Sufyan Iqbal PKFSCS

    Hi Sufyan

    You don't need to go to that length, as if you just did SELECT * FROM Quotes (joining in Opportunity and Company) then within the report on the Graph you can just pick Category = Opened (quot_opened) and tell it to do All Month Names, and the Values would be 'Count' - just put in the the view or Search Criteria the Year you want 

    The report will sort by month, count all the number of quote in that month 

    The chart would work - admittedly doing this way would me the report itself wouldn't be summarised, just depends on the purpose of the report, if for a Dashboard and you don't care about the report itself, just the chart, then this is the best way to go. 

  • 0 in reply to Matthew Shaw

    Hi Matthew

    this is my actual view (tried to paste in but was getting errors so had to take a screenshot)




    i need to show the converted % of quotes entered and converted but also straight orders entered and posted to 200. im not too bothered about the report itself but just need the graph to be ordered by month

  • +1 in reply to Sufyan Iqbal PKFSCS
    verified answer

    Is this what you're after? 



    The bars are the 'Rate Value' and the line is the 'Rate Count'. If so the script is the same as your, but as mentioned the issue is with the date values, you have stripped them back to just being numbers and not not meaning much to CRM. In mine I have kept them as dates - but set them all the 1st of the month and then grouped that way, CRM then recognises them as date values (I have only done previous year only because of the data in my test system)



    (Looking at the graph I might have got my columns and lines the wrong way around - bars look to be the % rate and the line is the value)

  • 0 in reply to Matthew Shaw

    this is perfect! thanks for your help, really appreciate it!