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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cross table manipulation

Hi

I want to manipulate the following table into a crosstable.

PRIMARY_TICKERSALES_BRAZILFY 2012SALES_BRAZILFY 2013SALES_BRAZILFY 2014
0486.HK65450
1010.SE401050

I was hoping to edit the titles so that I can pull back the extra granularity of the year. (without the "FY" even better!)

This is an example of how I was hoping to transform the data? Any ideas?

Thanks very much in advance

PRIMARY_TICKERRegionYearData
0486.HKSALES_BRAZILFY 201265
0486.HKSALES_BRAZILFY 201345
0486.HKSALES_BRAZILFY 20140
1010.SESALES_BRAZILFY 201240
1010.SESALES_BRAZILFY 201310
1010.SESALES_BRAZILFY 201450
Labels (1)
11 Replies
This widget could not be displayed.

or maybe better:

QlikCommunity_Thread_131168_Pic3.JPG.jpg

QlikCommunity_Thread_131168_Pic4.JPG.jpg

tabColName:

CrossTable (ColID, ColName)

LOAD RecNo() as RecNo, *

FROM [http://community.qlik.com/thread/131168] (html, codepage is 1252, no labels, table is @3)

Where RecNo()<3;

mapColName:

Mapping LOAD

  ColID,

  Concat(ColName, ':', RecNo) as ColName

Resident tabColName

Group By ColID;

DROP Table tabColName;

tabData:

CrossTable (Col, Value)

LOAD *

FROM [http://community.qlik.com/thread/131168] (html, codepage is 1252, no labels, table is @3)

Where RecNo()>3;

Left Join (tabData)

LOAD Col,

    SubField(Category, ':', 1) as Category,

    Dual(SubField(Category, ':', 2), Right(SubField(Category, ':', 2),2)) as FY;

LOAD Distinct

  Col,

  ApplyMap('mapColName', Col) as Category

Resident tabData;

RENAME Fields using mapColName;

DROP Field Col;

hope this helps

regards

Marco

or maybe better:

QlikCommunity_Thread_131168_Pic3.JPG.jpg

QlikCommunity_Thread_131168_Pic4.JPG.jpg

tabColName:

CrossTable (ColID, ColName)

LOAD RecNo() as RecNo, *

FROM [http://community.qlik.com/thread/131168] (html, codepage is 1252, no labels, table is @3)

Where RecNo()<3;

mapColName:

Mapping LOAD

  ColID,

  Concat(ColName, ':', RecNo) as ColName

Resident tabColName

Group By ColID;

DROP Table tabColName;

tabData:

CrossTable (Col, Value)

LOAD *

FROM [http://community.qlik.com/thread/131168] (html, codepage is 1252, no labels, table is @3)

Where RecNo()>3;

Left Join (tabData)

LOAD Col,

    SubField(Category, ':', 1) as Category,

    Dual(SubField(Category, ':', 2), Right(SubField(Category, ':', 2),2)) as FY;

LOAD Distinct

  Col,

  ApplyMap('mapColName', Col) as Category

Resident tabData;

RENAME Fields using mapColName;

DROP Field Col;

hope this helps

regards

Marco

or maybe better:

QlikCommunity_Thread_131168_Pic3.JPG.jpg

QlikCommunity_Thread_131168_Pic4.JPG.jpg

tabColName:

CrossTable (ColID, ColName)

LOAD RecNo() as RecNo, *

FROM [http://community.qlik.com/thread/131168] (html, codepage is 1252, no labels, table is @3)

Where RecNo()<3;

mapColName:

Mapping LOAD

  ColID,

  Concat(ColName, ':', RecNo) as ColName

Resident tabColName

Group By ColID;

DROP Table tabColName;

tabData:

CrossTable (Col, Value)

LOAD *

FROM [http://community.qlik.com/thread/131168] (html, codepage is 1252, no labels, table is @3)

Where RecNo()>3;

Left Join (tabData)

LOAD Col,

    SubField(Category, ':', 1) as Category,

    Dual(SubField(Category, ':', 2), Right(SubField(Category, ':', 2),2)) as FY;

LOAD Distinct

  Col,

  ApplyMap('mapColName', Col) as Category

Resident tabData;

RENAME Fields using mapColName;

DROP Field Col;

hope this helps

regards

Marco

or maybe better:

QlikCommunity_Thread_131168_Pic3.JPG.jpg

QlikCommunity_Thread_131168_Pic4.JPG.jpg

tabColName:

CrossTable (ColID, ColName)

LOAD RecNo() as RecNo, *

FROM [http://community.qlik.com/thread/131168] (html, codepage is 1252, no labels, table is @3)

Where RecNo()<3;

mapColName:

Mapping LOAD

  ColID,

  Concat(ColName, ':', RecNo) as ColName

Resident tabColName

Group By ColID;

DROP Table tabColName;

tabData:

CrossTable (Col, Value)

LOAD *

FROM [http://community.qlik.com/thread/131168] (html, codepage is 1252, no labels, table is @3)

Where RecNo()>3;

Left Join (tabData)

LOAD Col,

    SubField(Category, ':', 1) as Category,

    Dual(SubField(Category, ':', 2), Right(SubField(Category, ':', 2),2)) as FY;

LOAD Distinct

  Col,

  ApplyMap('mapColName', Col) as Category

Resident tabData;

RENAME Fields using mapColName;

DROP Field Col;

hope this helps

regards

Marco

MarcoWedel