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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Supress a column in a Crosstab

Status
Not open for further replies.

SimonPetherick

Technical User
Sep 25, 2002
49
AU
Hi,

Is it possible to supress 1 column in a crosstab?

I have created 2 crosstabs which display different info. However, all the data that is being called through the selection expert is appearing in both crosstabs. If it is not related to one of the crosstabs, it appears in a column but with no heading. This is what I want to supress.

Thanks,

SP
 
Or,

If I was to merge both crosstabs into 1, is it possible to achieve the following where Site1&2 is Site 1 + Site 2:

Date Site 1 Site 2 Site 3 Site1&2
10 Jul 100 200 50 300
11 Jul 12 50 100 62

Thanx....

SP
 
In format crosstab, if you select the field in question, click on group options and choose specified order, you can define Site 1 and Site 2 and then click on the tab "Others" and choose "discard all others." Then your crosstab will show only sites 1 and 2 and their total.

-LB
 
LB
I think you've miss interpretated me.

I'd like to show all of the above, ie Site1, Site2, Site3 aswell as Site1+Site2. Can this be done?

Thanx.

SP
 
Sorry, I was responding to your first post, where you were looking to suppress an unwanted column of information.

To get the individual columns and a combined subset, I think you'd have to do a manual crosstab, by creating formulas like this:

{@Site1}:
if {table.site} = 1 then {table.amt}

{@Site2}:
if {table.site} = 2 then {table.amt}

{@Site3}:
if {table.site} = 3 then {table.amt}

{@Site1and2}:
if {table.site} in [1,2] then {table.amt}

Place these in the details section and insert summaries on them at group and/or report levels.

-LB
 
OK.
So I can't do a crosstab, is that what your saying?

Is there a formula I can use for the crosstab...ie:

if {SITES.SIT_ID} = 32 then "Elizabeth Gate" else
if {SITES.SIT_ID} = 71 then "Gepps Cross Gate" else
if {SITES.SIT_ID} = 120 then "Taperoo Gate" else
if {SITES.SIT_ID} = 140 then "Burra Gate"

and

if {SITES.SIT_ID} in [32,71,120,140] then "Metro Gates"

This formula doesn't seem to work.....

Cheers,

SP
 
The same formula will not give two sets of results per record, which is why you're not picking up any results for "Metro Gates." It sounds like originally you might have tried to accomplish this with two crosstabs. You could do "Metro Gates" in a separate crosstab, suppress the row labels, align it with the first crosstab, and eliminate the grid lines.

My suggestion above is still a crosstab--it is just developed manually.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top