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.
Not applicable

Transforming an Excel table

I have the next Excel tabel and i want to transform it into another format.

Source;

2011-05-31 18.0001.gif

The table in QV should look like this.

2011-05-31 18.0102.gif

Can anyone help me out here, I 've tried (see the attached QV file) but I didn't get to the right result.

Thnx in advance!!

Tags (1)
1 Solution

Accepted Solutions
pat_agen
Valued Contributor

Transforming an Excel table

add this code to the load script:

finalTable2:

load

   'new' as dummy,

      fProduct,

      fDate,

      sum(FactA)   as FactA,

      sum(FactB)   as FactB,

      sum(FactC)   as FactC

resident finalTable

group by fProduct,

      fDate;

drop table finalTable;

drop field dummy;

4 Replies
pat_agen
Valued Contributor

Re: Transforming an Excel table

hi,

not sure if you just wantthe result in a chart or if you are looking for an actaul table with three Facts A, B and C.

The attached qvw shows how to achieve both.

the chart solution can be built straight out of what you already have.

The table solution requires some more code in the script.

Not applicable

Re: Transforming an Excel table

I'm looking for a actual table with the three facts, the example you sent me is almost the solution;

2011-05-31 20.4401.gif

But I want the facts on one row so I can perform calculations on row level and not only on aggregated level.

2011-05-31 18.0102.gif

pat_agen
Valued Contributor

Transforming an Excel table

add this code to the load script:

finalTable2:

load

   'new' as dummy,

      fProduct,

      fDate,

      sum(FactA)   as FactA,

      sum(FactB)   as FactB,

      sum(FactC)   as FactC

resident finalTable

group by fProduct,

      fDate;

drop table finalTable;

drop field dummy;

Not applicable

Transforming an Excel table

That's it!! Thnx!!

Community Browser