Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
ajsjoshua
Contributor III

Cross table

Hi all,

I want to convert the following columns vertically as Branch

0854 - GXWFI0855 - GXOAS0857 - GXBU10859 - GXGAZ0860 - GXFRA0861 - GXHDB0862 - GXPLD0863 - GXNHD0864 - GXHMN0865 - GXMAC0866 - GXARM0868 - GXTCM0869 - GXFRD0870 - GXNTT0872 - GXUAQ0873 - GXMZY0874 - GXBRJ0877 - GXQOZ0878 - GXDIA

and following columns vertically as hypermarket

AjmanDeiraAl Saqr ADHRAK ManarMarina MallJimmy MallSharjahShindagaCentury MallMall of EmiratesAl Ain BawadiRAK Zaith 2Dalma Store AUHMirdiffBaniyasFuj Cent Mall

pls find the attached excel.

Regards,

Joshua

Tags (1)
10 Replies

Re: Cross table

Try this? PFA

USE JOIN for 2 cross tables?

Life is so rich, and we need to respect to the life !!!
ajsjoshua
Contributor III

Re: Cross table

Dear Anil,

I am getting this error

Untitled.png

Regards,

Joshua.

Re: Cross table

Use Cross table load with the wizard way and try this way and load the table two times

//When create this table select only Branch columns

Table1:

CrossTable(Branch, Data, 20)

LOAD

...

...

//When create this table select only Hypermarket columns

Table2:

CrossTable(hypermarket, Data, 20)

LOAD

...

...

Re: Cross table

May be remove JOIN and check

Life is so rich, and we need to respect to the life !!!

Re: Cross table

After loading this tables use resident load of the tables.

Table1:

CrossTable(Branch, Data, 20)

LOAD

...

...

//When create this table select only Hypermarket columns

Table2:

CrossTable(hypermarket, Data, 20)

LOAD

...

...

///////////////////////////

Noconcatenate

Final:

Load * , 'Branch Table' as TableFlag Resident Table1;

Concatenate(Final)

Load * , 'Hypermarket Table' as TableFlag Resident Table2;


Drop Tables Table1,Table2;




ajsjoshua
Contributor III

Re: Cross table

Dear Anil,

All hypermarkets are also coming under Branch column I want only from 0854-GXWFI to 0878-GXDIA in branch column .

In hypermarket column i want only from Ajman to Fuj Cent Mall

2.png

Regards,

Joshua.

Re: Cross table

As i stated over end up the script, There is some Remove(Col, Pos(Top, 36)), that means i've removed all those which is unnecessary, Will you do the same while transformation

Life is so rich, and we need to respect to the life !!!
ajsjoshua
Contributor III

Re: Cross table

Dear Anil,

Yes bro but the columns still exists.

Regards,

Joshua.

Re: Cross table

Try this?

Capture.PNG

Life is so rich, and we need to respect to the life !!!
Community Browser