Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cross Table Help

Hello All,

Please find the attached document,

Need Help on the arrangement of data in Cross table.

Please check the excel data contains 2 dimensions and 3-3 common data.

I want data like below

Dept  Profit centre Date Units Total Cost

Please help me 

1 Solution

Accepted Solutions
sunny_talwar

May be try this:

Table:

CrossTable(Header, Value, 2)

LOAD *

FROM

[Sample Excel.xlsx]

(ooxml, embedded labels, table is Sheet1);

FinalTable:

LOAD DISTINCT

  RowNo() as Key,

  Dept,

  [Cost Centre],

  Value as Date

Resident Table

Where Header LIKE 'Date*';

Join(FinalTable)

LOAD DISTINCT

  RowNo() as Key,

  Dept,

  [Cost Centre],

  Value as Units

Resident Table

Where Header LIKE 'Units*';

Join(FinalTable)

LOAD DISTINCT

  RowNo() as Key,

  Dept,

  [Cost Centre],

  Value as [Total Cost]

Resident Table

Where Header LIKE 'Total Cost*';

DROP Table Table;


Capture.PNG

View solution in original post

4 Replies
qlikview979
Specialist
Specialist

Hi,

Please find the attached document .

May be this.

Untitled.png

Not applicable
Author

Thanks for your prompt reply,

attached file contains only one date only but i Need all dates in the excel file.

Please help ..

Regards

Surender

sunny_talwar

May be try this:

Table:

CrossTable(Header, Value, 2)

LOAD *

FROM

[Sample Excel.xlsx]

(ooxml, embedded labels, table is Sheet1);

FinalTable:

LOAD DISTINCT

  RowNo() as Key,

  Dept,

  [Cost Centre],

  Value as Date

Resident Table

Where Header LIKE 'Date*';

Join(FinalTable)

LOAD DISTINCT

  RowNo() as Key,

  Dept,

  [Cost Centre],

  Value as Units

Resident Table

Where Header LIKE 'Units*';

Join(FinalTable)

LOAD DISTINCT

  RowNo() as Key,

  Dept,

  [Cost Centre],

  Value as [Total Cost]

Resident Table

Where Header LIKE 'Total Cost*';

DROP Table Table;


Capture.PNG

Not applicable
Author

Thanks Sunny,

Regards,

Surender