Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Crosstab: Sort by Calculated member

I am using CR 2008 to create a crosstab

Group, Week 1, Week 2, % Week 2

GRP1, 2, 3, 30%

GRP2, 4, 5, 50%

GRP3, 6, 2, 20%

TOTAL, 12, 10, 100%

The % Week 2 is a calculated member based on the values in week 2.

I now need to sort the crosstab by the % column = % Week 2 highest to lowest.

How do I proceed?

replied

Hello, there may be something easier in Crystal 2008 but in Crystal 10 you can do the following:

1. Create a formula field and in the formula editor put something like

totext(Week2 value) + whatever is your current row field.

2. This formula field should be your "Rows" field in the cross-tab.

3. Click on the "Group Options" for the row formula field and set it to sort descending.

4. Right-click on the formula field name in the cross-tab and select "Format Field".

5. Click on the "x-2" button to the right of the "Display String" option and enter a formula there like

MID(currentfieldvalue, 5, 20)

or wherever the "real" data you want to print as a row begins. This will only print your real row information but the rows should be sorted descending by the Week2 value first. Hope this helps!

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question