Custom CRM 2011 chart does not sort by the aggregate value as defined in the xml

Answered Custom CRM 2011 chart does not sort by the aggregate value as defined in the xml

  • 2012년 4월 26일 목요일 오후 8:08
     
      코드 있음

    I have a chart which was created in the GUI in CRM 2011, then exported to tweak a few things such as sort order and axis labels, and re-imported.

    It is supposed to sort by the aggregate value, just like the "top 10 customers" opportunity chart does (against which I have compared the xml very closely and see no difference), but it simply ignores the sort order. Setting descending = true or false doesn't make any difference.

    Chart is a simple column chart showing total of a custom field (happens to be a currency field), grouped by a custom option set field, and I want to sort it by the sum, ie rank the columns with the highest first and lowest last. XML below:

    <visualization>
      <visualizationid>{13B316E4-AE8F-E111-8B9A-000C2917CC01}</visualizationid>
      <name>Value by Category</name>
      <primaryentitytypecode>account</primaryentitytypecode>
      <datadescription>
        <datadefinition>
          <fetchcollection>
            <fetch mapping="logical" count="8" aggregate="true">
              <entity name="account">
                <attribute name="new_annualvaluecurrency" aggregate="sum" alias="Sum_AnnualValue" />
                <attribute name="new_customercategoryoptionset" groupby="true" alias="Category"  />
                <order alias="Sum_AnnualValue" descending="false" />
              </entity>
            </fetch>
          </fetchcollection>
          <categorycollection>
            <category>
              <measurecollection>
                <measure alias="Sum_AnnualValue" />
              </measurecollection>
            </category>
          </categorycollection>
        </datadefinition>
      </datadescription>

    NB: I am not trying to sort it by the category names / values - I know there are various threads where people have issues getting funnel charts to appear in the same order as the values in an option set. This is not the same scenario, I simply want a nice ranked chart.

    Anybody have any tips or code examples that work?


    Hope this helps. Adam Vero, MCT

모든 응답

  • 2012년 8월 21일 화요일 오전 7:15
     
     답변됨

    We have experienced the same with Top 10 for quotes (aggregate by totalamount, groupby Name).

    However, if you use a lookup field for groupby it works correctly. In your case it should work if you exchange optionset to lookup.

    Seems like a bug..

    • 답변으로 표시됨 Adam Vero 2012년 8월 21일 화요일 오전 10:32
    •  
  • 2012년 8월 21일 화요일 오전 8:10
     
     

    Hi Adam/Marius,

    This indeed looks like a bug. Can you open a bug using the http://connect.microsoft.com/ so that this can be tracked for the next Update Rollup.

    Thanks!

    Rahul Agarwal

  • 2012년 8월 21일 화요일 오전 8:56
     
     
  • 2012년 8월 21일 화요일 오전 10:31
     
     

    Thanks Marius!

    Yes, we will take care of this issue.

    Regards,

    Rahul Agarwal

    • 답변으로 표시됨 Adam Vero 2012년 8월 21일 화요일 오전 10:32
    • 답변으로 표시 취소됨 Adam Vero 2013년 1월 10일 목요일 오후 3:09
    •  
  • 2012년 9월 11일 화요일 오전 4:43
     
     

    Marius/Adam,

    If you want an immeadiate fix for this issue in the next UR, then please contact support team to escalate the issue.

    Regards,

    Rahul Agarwal

  • 2012년 11월 6일 화요일 오후 4:33
     
     

    Looks like we have a similar problem with optionsets. I wonder if a fix has been planned..


    Alex Shlega, GotchaHunter.Net


    • 편집됨 Alex Shlega 2012년 11월 6일 화요일 오후 4:38
    •  
  • 2012년 12월 13일 목요일 오후 6:11
     
     

    Hello Rahul,

    Has this issue been fixed yet, or when is it slated to be fixed?

    Thanks.

  • 2013년 1월 10일 목요일 오후 3:09
     
     
    Did anything ever happen with this?

    Hope this helps.

    Adam Vero, Microsoft Certified Trainer | Microsoft Community Contributor 2011

    Blog: Getting IT Right


    • 편집됨 Adam Vero 2013년 1월 10일 목요일 오후 3:11
    •  
  • 2013년 1월 10일 목요일 오후 3:15
     
     
    Do you know if anyone did escalate this via support, and if so what was the outcome?

    Hope this helps. Adam Vero, Microsoft Certified Trainer | Microsoft Community Contributor 2011 Blog: Getting IT Right

  • 2013년 3월 12일 화요일 오후 10:22
     
     답변됨

    Finally found a proper general answer to my own question.

    You can't order a simple single-series chart nor a stacked chart categorised by an option set (but a lookup is OK)

    You also can't order a stacked chart where it is stacked by an option set and categorised by a lookup.

    However, you can achieve a ranked chart by starting out with multiple series and filtering these so each contains only the records for one option set value, then stack these. You can then order by one of the series or by an extra series for the total (which would ideally be hidden by making it a point-only chart with invisible points).

    Full details and example screenshots and XML in this thread:
    http://social.microsoft.com/Forums/en-US/crm/thread/b19ae642-5af4-4cd4-abd5-a5f72efc03b0

    Lots of initial inspiration from Ulrik Carlsson, the CRM Chart Guy:

    http://crmchartguy.wordpress.com/2013/03/10/aggregate-total-on-top-of-stacked-column-charts-or-bar-charts-in-ms-crm-2011/


    Hope this helps.
    Adam Vero, Microsoft Certified Trainer | Microsoft Community Contributor 2011
    Blog: Getting IT Right

    • 답변으로 표시됨 Adam Vero 2013년 3월 12일 화요일 오후 10:22
    •