Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
julioarriaga
Creator II
Creator II

Crosstable from a Binary

Hi,

I have a table from a binary load that goes more or less like Image 1 and I would like to order like Image 2 (Gross Salues, Returns, etc), but I'm not sure how the syntax of "crosstable" would work as there is a field ("Period Type") in the middle.
Thanks in advance.
(Image 1)

Capture1.PNG

(Image 2)

Capture2.PNG

1 Solution

Accepted Solutions
sunny_talwar

Lets assume the table is called Table1... you can do like this

CrossTable:

CrossTable(Item, Value)

LOAD Period,

     [Gross Sales],

     [Returns],

     [Total Off Invoice],

     [Rebates],

     [BillBacks],

     [Co-op]

Resident Table1;

DROP Table Table1;

View solution in original post

3 Replies
sunny_talwar

Lets assume the table is called Table1... you can do like this

CrossTable:

CrossTable(Item, Value)

LOAD Period,

     [Gross Sales],

     [Returns],

     [Total Off Invoice],

     [Rebates],

     [BillBacks],

     [Co-op]

Resident Table1;

DROP Table Table1;

jonathandienst
Partner - Champion III
Partner - Champion III

Or if you would like to keep [Period Type]:

CrossTable:

CrossTable(Item, Value, 2)

LOAD Period,

    [Period Type],

    [Gross Sales],

    [Returns],

    [Total Off Invoice],

    [Rebates],

    [BillBacks],

    [Co-op]

Resident Table1;

DROP Table Table1;

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
julioarriaga
Creator II
Creator II
Author

If I could mark two posts as correct answers, I would . Thank you for your input, this is also correct.