cancel
Showing results for 
Search instead for 
Did you mean: 

Cross-tab and running total strings

Former Member
0 Kudos

I am trying to build a cross tab which will display for conditions x and y all the string values of z in the sumation field. Originating data would be

x values y values z values

1 1 aaaaaaa

1 1 bbbbbbb

1 1 ccccccc

1 2 ddddddd

1 2 eeeeeee

3 1 ggggggg

what i need back is

x values y values z values

1 1 aaaaaaa, bbbbbbb, ccccccc

1 2 ddddddd, eeeeeee

3 1 ggggggg

I've tried a number of formula ideas but I can not seem to get the z values to show up as desired. Any thoughts or suggestion would be appreciated.

Don

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

This was resolved by using a sub-report containing a 3x3 matrix of string objects. The string objects were assigned string variables which were built while reading recods. The matrix was put in the report footer of the subreport.

Former Member
0 Kudos

Hi,

Given that x and y are strings, you need to concatenate the strings.You need to create a formula by going to Field Explorer->Formula Fields->(Right Click)->Create new... and write a code in the following fashion:

x&" "&y

(Note: " " is to keep space between values)

Given that x and y are integers(numeric fields), you need to concatenate the strings.You need to create a formula by going to Field Explorer->Formula Fields->(Right Click)->Create new... and write a code in the following fashion:

totext(x)&" "&totext(y)

Drag this field in the Rows section of the Cross Tab Expert->Cross Tab(panel).

Drag the y field in the Columns section of the Cross Tab Expert->Cross Tab(panel).

See the output.This should work.

Thanks,

Amogh

Former Member
0 Kudos

Thank you Amogh,

Your solution gave me some other ideas but was not what I was looking for. My end result is a 3 x 3 matrix with each segment containing the values of z applicable to that intersection of x and y.