Skip to Content
author's profile photo Former Member
Former Member

How to sort groups based on calculated field?

Hi all,

I have a quesion. I have a report with 3 groups. Here's how it looks like when it first run (Group1 level):

M1 M2 M3 M4 ... M13 CY PY Diff Diff%

2 5 5 8 5 25 20 5 20%

4 5 6 5 5 25 30 -5 -20%

1 2 15%

I need to sort these groups by Diff%. When I go to Report - > Group Sort Expert and select "All" based on... it gives me some other formulas in drill down but not that one that I need. How to add formula I need to that drop down list that CR offers you to sort group based on?

I'm using CR XI R2.


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 08, 2008 at 07:55 PM

    Hi Vitaly,

    The Diff % must have been calculated on a particular field,so it will give higher % for a higher value numerator and a lower value for a lower value numerator.

    So, one option is to sort it by the field in the numerator.Other option is to introduce a "WhileReadingRecords" command in the fromula which you want to see.


    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Yea, I see what you mean. I had exectly the same situation. As I said I ended calculate all ration in the sp and return it to report already precalculated for EACH level of grouping. In this case I can create aggregation function on this precalculated field and use it to sort group based on it. I understand that this is kind of wierd solution but it was only one solution that I could find for this case.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.