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

Cross table file for two measure

Hi All,

I need to upload in the attached file into the qlikview In that I have QTY_001 that is my QTY for Apr month and VAL_001 values for Apr ..... Like this till Mar(012)

This data is for 2018-19 ...

I am not understand how I get two measure one Qty and second is Values with proper month  for 2018-19

Please find the attachment.

1 Solution

Accepted Solutions
arvind1494
Specialist
Specialist

Hello friend Use this approach

Table1:

load PROD_ID,

     QTY_001 As Apr ,

     QTY_002 As May,

     QTY_003 as June, 

     QTY_004 as Jul,

     QTY_005 as Aug, 

     QTY_006 as Sep,

     QTY_007 as Oct, 

     QTY_008 as Nov,

     QTY_009 as Dec,

     QTY_010 as Jan,

     QTY_011 as Feb, 

     QTY_012 as Mar

FROM

(biff, embedded labels, table is Sheet1$);

Data1:

Crosstable (Month, Quantity, 1) load * Resident Table1;

DROP Table Table1;

Table2:

load PROD_ID,

     VAL_001 As Apr ,

     VAL_002 As May,

     VAL_003 as June, 

     VAL_004 as Jul,

     VAL_005 as Aug, 

     VAL_006 as Sep,

     VAL_007 as Oct, 

     VAL_008 as Nov,

     VAL_009 as Dec,

     VAL_010 as Jan,

     VAL_011 as Feb, 

     VAL_012 as Mar

FROM

(biff, embedded labels, table is Sheet1$);

Data2:

CrossTable(Month,Value,1) load * Resident Table2;

DROP Table Table2;

MODEL:

Inner Join(Data1)

load * Resident Data2;

DROP Table Data2;

You will get following result:

Arvind.png

Regards,

Arvind

View solution in original post

7 Replies
YoussefBelloum
Champion
Champion

Hi,

what do you mean by this "I am not understand to how can I get two measure one Qty and second is Values with proper month  for 2018-19" ?

what is the expected output ?

prma7799
Master III
Master III
Author

I am taking only one prodId for example

expected output.png

balabhaskarqlik

May be like this:

TableA:

CrossTable(QTY,VAL,2)

Load *

from abc;

prma7799
Master III
Master III
Author

Not getting desire output.

I wanted to simply load attached excel .

after upload I should get Apr to Mar Values and Apr to March Qty for respected product.

YoussefBelloum
Champion
Champion

Hi,

you're trying to pivot the first line (label line) to a column. so yo need to use crosstable

arvind1494
Specialist
Specialist

Hello friend Use this approach

Table1:

load PROD_ID,

     QTY_001 As Apr ,

     QTY_002 As May,

     QTY_003 as June, 

     QTY_004 as Jul,

     QTY_005 as Aug, 

     QTY_006 as Sep,

     QTY_007 as Oct, 

     QTY_008 as Nov,

     QTY_009 as Dec,

     QTY_010 as Jan,

     QTY_011 as Feb, 

     QTY_012 as Mar

FROM

(biff, embedded labels, table is Sheet1$);

Data1:

Crosstable (Month, Quantity, 1) load * Resident Table1;

DROP Table Table1;

Table2:

load PROD_ID,

     VAL_001 As Apr ,

     VAL_002 As May,

     VAL_003 as June, 

     VAL_004 as Jul,

     VAL_005 as Aug, 

     VAL_006 as Sep,

     VAL_007 as Oct, 

     VAL_008 as Nov,

     VAL_009 as Dec,

     VAL_010 as Jan,

     VAL_011 as Feb, 

     VAL_012 as Mar

FROM

(biff, embedded labels, table is Sheet1$);

Data2:

CrossTable(Month,Value,1) load * Resident Table2;

DROP Table Table2;

MODEL:

Inner Join(Data1)

load * Resident Data2;

DROP Table Data2;

You will get following result:

Arvind.png

Regards,

Arvind

arvind1494
Specialist
Specialist

Thank You P M