Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
simonagheo
Contributor III
Contributor III

CorssTable Problem

Hello,

I have an excel file structured like this:

 

KeyMonth-1Month-2Month-3
A100100300
B200200200

and I want to load it using crosstable. I made the attached script for this.

tmp table is loaded ok, the problem is that in tmp2 table the Amount column is equal with period column:

  

KeyPeriodAmountAmount should be
A11100
B11200
A22100
B22200
A33300
B33200

What is wrong with my crosstable?

Thank you!

1 Solution

Accepted Solutions
Not applicable

Temp:

Load * Inline [

Key, Month-1, Month-2, Month-3

A, 100, 100, 300

B, 200, 200, 200

];

Temp2:

CrossTable(Period, Amount, 1)

Load *

Resident Temp;

Drop table Temp;

Capture.PNG

is this something you are looking for?

View solution in original post

3 Replies
Not applicable

Temp:

Load * Inline [

Key, Month-1, Month-2, Month-3

A, 100, 100, 300

B, 200, 200, 200

];

Temp2:

CrossTable(Period, Amount, 1)

Load *

Resident Temp;

Drop table Temp;

Capture.PNG

is this something you are looking for?

simonagheo
Contributor III
Contributor III
Author

In the period column I want to have other values like 1,2,3,...,12

simonagheo
Contributor III
Contributor III
Author

I changed tmp2 script like you said, I put * instead of all field names (it's not the same thing?) and I added the third parameter at crosstable function and it's working now. Thank you!