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

Crosstable to Pivot Table

Hi.

I'm trying to make an income statement report. For this, I'm making a pivot table with sales data, costs data and utility data. When I load the script, the table looks like this:

Month      Sales          Costs         Utility

1               10                  5               5      

2               13                  7               6

3               15                  8               7

But I need that the table looks like this:

Month               1           2            3

Sales               10         13          15

Costs                5           7            8   

Utility                 5           6            7  

How can I get that? Somebody suggests me use the function Crosstable, but I could not add it in my script. The code tha I'm using is this:

D_LIBROMAYOR:

CrossTable ([Nombre Cuenta Reporting],[Mvto Mes])

load * from

(qvd);

D_LIBROMAYOR_2:

LOAD

*, [Nombre Cuenta Reporting],

     [Mvto Mes],

     Mes

   

Resident D_LIBROMAYOR;

Anybody has any suggestion? Thank you for the collaboration.

Jairo Medina

1 Solution

Accepted Solutions
IAMDV
Luminary Alumni
Luminary Alumni

Hi Jairo,

See the attachment and let me know if that's what you need?

Cheers,

DV

www.QlikShare.com

View solution in original post

4 Replies
IAMDV
Luminary Alumni
Luminary Alumni

Hi Jairo,

See the attachment and let me know if that's what you need?

Cheers,

DV

www.QlikShare.com

Not applicable
Author

Hi Deepak.

Yes. It is!!! Thank you.

Regards,

Jairo Medina

IAMDV
Luminary Alumni
Luminary Alumni

That's great!

Cheers,

DV

Not applicable
Author

Hi Deepak.

I have a question. How must I do this when the data come from a qvd? My plain file is:

[F/Contab],

     Mes,

     Año,

     [F/Vcto],

     Clase,

     Grupo,

     Cuenta,

     [Sub Cuenta],

     Auxiliar,

     [Nombre Cuenta Reporting],

     Clasificacion,

     [Nombre Cuenta],

     Serie,

     [Nº documento],

     [Nº folio],

     [Nº trans#],

     Comentarios,

     [Cod Proyec],

     [Ctro Benef],

     Gerencia,

     Ciudad,

     Canal,

     [Sub Canal],

     [Nom Gerencia],

     [Nom Ciudad],

     [Nom Canal],

     [Nom Subcanal],

     [Cuenta de contrapartida],

     [Nombre de la cuenta de contrapartida],

     [Mvto Mes],

     [Mvto Mes1],

     [Codigo SN],

     [Nombre SN],

     F34,

     F35,

     NoName

FROM

(qvd);

The fields that I need to use are "Mes", "Nombre Cuenta Reporting", "Nombre Cuenta" and "Mvto Mes".

Thank you for your help.

Jairo Medina