Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Partner
Partner

Advance Transpose Case

Hi Community,

I have a table like this:

Qst_MTM_source.jpg

I want to transpose that table, so my expectation output should be like this:

Qst_MTM_expect.jpg

Could you show me the best practice or script solution to have an output like above?

Herewith I attach my source data.

Thank you.

Tags (2)
1 Reply

Re: Advance Transpose Case

Try this

Table:

CrossTable(DATE, VALUE, 5)

LOAD PRODUCT,

    RANGE,

    FOB,

    Port,

    MTM,

    [42737.000000],

    [42738.000000],

    [42739.000000],

    [42740.000000],

    [42741.000000],

    [42744.000000],

    [42745.000000]

FROM

[..\..\Downloads\Qst_MTM.xlsx]

(ooxml, embedded labels, table is Source, filters(

Transpose()

));


FinalTable:

NoConcatenate

LOAD PRODUCT,

Date(RANGE) as RANGE,

FOB,

Port,

MTM,

Date(Num#(DATE)) as DATE,

Num(VALUE) as VALUE

Resident Table;


DROP Table Table;


Capture.PNG