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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cross Table with looping

hiii i m stuck in issue whr i want 2 cross table nd then concatenate. i m attaching the dummy data along with output

1 Solution

Accepted Solutions
Not applicable
Author

Hi Amit,

You can try the script below. For the Month, you might need to rename to Month Year if you need to link it to a calendar. Currently i just show as what they are

Retails_Tmp:

LOAD [All Models Retails] As [SR No],

     F2 As [Region],

     F3 As [Dlr Code],

     F4 As City,

     'Retail' As Type,

     Jan,

     Feb,

     Mar,

     Apr,

     May,

     Jun,

     July

FROM

(ooxml, embedded labels, header is 1 lines, table is Retails, filters(

Remove(Row, Pos(Top, 2))

))

WHERE Len([All Models Retails])>0;

Sales:

CrossTable(Mth, Val,5)

LOAD *

Resident Retails_Tmp;

DROP TABLE Retails_Tmp;

WS_Tmp:

LOAD [All Models Wholesale] As [SR No],

     F2 As [Region],

     F3 As [Dlr Code],

     F4 As City,

     'Wholesale' As Type,

     Jan,

     Feb,

     Mar,

     Apr,

     May,

     Jun,

     July

FROM

(ooxml, embedded labels, header is 1 lines, table is WS, filters(

Remove(Row, Pos(Top, 2))

));

//this will concatenate with the first Sales crosstable

CrossTable(Mth, Val,5)

LOAD *

Resident WS_Tmp;

DROP TABLE WS_Tmp;

View solution in original post

7 Replies
Not applicable
Author

Hi Amit,

You can try the script below. For the Month, you might need to rename to Month Year if you need to link it to a calendar. Currently i just show as what they are

Retails_Tmp:

LOAD [All Models Retails] As [SR No],

     F2 As [Region],

     F3 As [Dlr Code],

     F4 As City,

     'Retail' As Type,

     Jan,

     Feb,

     Mar,

     Apr,

     May,

     Jun,

     July

FROM

(ooxml, embedded labels, header is 1 lines, table is Retails, filters(

Remove(Row, Pos(Top, 2))

))

WHERE Len([All Models Retails])>0;

Sales:

CrossTable(Mth, Val,5)

LOAD *

Resident Retails_Tmp;

DROP TABLE Retails_Tmp;

WS_Tmp:

LOAD [All Models Wholesale] As [SR No],

     F2 As [Region],

     F3 As [Dlr Code],

     F4 As City,

     'Wholesale' As Type,

     Jan,

     Feb,

     Mar,

     Apr,

     May,

     Jun,

     July

FROM

(ooxml, embedded labels, header is 1 lines, table is WS, filters(

Remove(Row, Pos(Top, 2))

));

//this will concatenate with the first Sales crosstable

CrossTable(Mth, Val,5)

LOAD *

Resident WS_Tmp;

DROP TABLE WS_Tmp;

settu_periasamy
Master III
Master III

May be check the Attachment.

Not applicable
Author

which attachment

settu_periasamy
Master III
Master III

I think you are looking via inbox. open the separte window.. or click here..

Cross Table with looping

Not applicable
Author

thnks

Not applicable
Author

could you provide me qvw of the code and also tell me how you are using this" Remove(Row, Pos(Top, 2))"

Not applicable
Author

You can just follow the File Wizard steps. Please see attached file for the step i did