Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

crystal 9-how to use selection for totals in cross tab?

Status
Not open for further replies.

bgon1

Technical User
Nov 5, 2005
11
CA
I have just begun using cross tabs. I have a report and want to select records that total less than a specified value. However when I choose the selection tool, the totals are not showing up as a selection source. I can choose from any data table, but not from the summaries. In a regular report I can. Any ways around that?
 
Not sure what this has to do with crosstabs. The only place you can select summaries for filtering is in the group selection area. Go to report->selection formula->group and enter your criteria there.

-LB
 
please clarify, what do you mean by total_less? when is total_less decided?
 
To explain this further, I have a cross tab as follows:

date1 date 2 date 3 TOTAL
cust puchases
quantity xx xx xx xxx
$ amount xxx xxx xxx xxxx

I want to report only those records where the total quantity or dollar volume is > any value I choose.

Normally I would use the "select expert", find the summed field I want and enter the criteria. However when I do this, only the report fields show up, not the sum. So I can't select records based on the row totals. That's what I'm trying to do.
 
Summaries are only available for group selection, which occurs at a later pass than does the crosstab object, i.e., group selection won't limit the crosstab rows. In XI, to limit the rows, you could use a formula like:

if sum({table.amt},{table.rowfield}) > 700000 then {table.rowfield}

You could add this as your row, and only those rows with totals > 700000 would appear in the crosstab.

-LB

 
Thanks LB I'm beginning to understand how this works. However, regrettably I'm still missing something.

The table I am retrieving the data from is called SALES. The fields are:
sales.Name
sales.Address
sales.Quantity
sales.Description
etc.

So what do you mean by "rowfield"? The crosstab I created about is sorted in the row by customer name. Then the data is shown (qty puchased, $ purchased) and totaled up on the right side and bottom of the report.

I really appreciate your help.bg
 
Your rowfield is then customer name. Your formula would be:

if sum({sales.quantity},{sales.name}) > 700000 then {sales.name}

To do this, you would have to have a group on {sales.name} in the main report.

The other thing you could do, without using any special formulas is to do a topN sort on the crosstab so that it only shows the topN groups, but this doesn't seem to be what you're looking for. To do a topN, you'd select the crosstab (click on upper left empty corner)->report->group sort.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top