Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Cross table

Hello Everyone,

How to apply cross table function in the below data?

crosstable.PNG

Regards

kulwant

1 Solution

Accepted Solutions
its_anandrjs

Hi,

Load your data this way

tmpSource:

CrossTable(Dates, Data, 2)

LOAD F1,

    F2,

    [01/11],

    [02/11],

    [03/11]

FROM

Data1.xlsx

(ooxml, embedded labels, table is Sheet1);

LOAD

F1 as Area,

F2 as Range,

Dates,

Data

Resident tmpSource Where Data <> '%';

DROP Table tmpSource;


OutPut:-

OP3.PNG

View solution in original post

6 Replies
Anil_Babu_Samineni

Instead Cross table you can apply transpose while loading.. Can you share excel file and expected result

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

attached

its_anandrjs

Hi,

Load your data this way

tmpSource:

CrossTable(Dates, Data, 2)

LOAD F1,

    F2,

    [01/11],

    [02/11],

    [03/11]

FROM

Data1.xlsx

(ooxml, embedded labels, table is Sheet1);

LOAD

F1 as Area,

F2 as Range,

Dates,

Data

Resident tmpSource Where Data <> '%';

DROP Table tmpSource;


OutPut:-

OP3.PNG

Anonymous
Not applicable
Author

thanks

Anil_Babu_Samineni

Here we go

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

Crosstable can be done directly while loading data only.

Click Table Files -> Next-> Next-> Under Prefixes select -> Crosstable-> Select Qualifier fields-> Atrribute fields (Which you want to make it straight) -> Data field

CrossTable(Account, Data)

LOAD MonthlyRegionKey,

     Account,

     ExpenseActual,

     ExpenseBudget

FROM ....

Now table will be of 3 columns

MonthlyRegionKey | Account   | Data

                                Account

                               Exp Actual

                               Exp Budget