Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have the following table
| State | JanSales | JanOrdCount | FebSales | FebOrdCount |
|---|---|---|---|---|
| A | 10000 | 45 | 47000 | 23 |
| B | 30000 | 25 | 67000 | 43 |
Using crosstable can we get following table output
| State | Month | Sales | OrderCount |
|---|---|---|---|
| A | Jan | 10000 | 45 |
| A | Feb | 47000 | 23 |
| B | Jan | 30000 | 25 |
| B | Feb | 67000 | 43 |
thanks in Advance ![]()
Perhaps like this:
tempSales:
CrossTable(Month,Sales)
LOAD
State,
JanSales,
FebSales,
FROM
....source...
;
tempOrderCount
CrossTable(Month,OrderCount)
LOAD
State,
JanOrdCount,
FebOrdCount,
FROM
....source...
;
Result:
NoConcatenate
LOAD
State,
Left(Month,3) as Month
Sales
Resident
tempSales
;
Drop table tempSales;
JOIN (Result)
LOAD
State,
Left(Month,3) as Month
OrderCount
Resident
tempOrderCount
;
Drop table tempOrderCount;
Perhaps like this:
tempSales:
CrossTable(Month,Sales)
LOAD
State,
JanSales,
FebSales,
FROM
....source...
;
tempOrderCount
CrossTable(Month,OrderCount)
LOAD
State,
JanOrdCount,
FebOrdCount,
FROM
....source...
;
Result:
NoConcatenate
LOAD
State,
Left(Month,3) as Month
Sales
Resident
tempSales
;
Drop table tempSales;
JOIN (Result)
LOAD
State,
Left(Month,3) as Month
OrderCount
Resident
tempOrderCount
;
Drop table tempOrderCount;