Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
absekrafi
Creator III
Creator III

How to use a table fields twice in a pivot Table

Hi Qlikview community,

I am new to Qlikview and I have 2 questions:

1. I have Table, Transfer that contains the quantity transferred between factories.

The source factory has a CODUSN and the Destination factory has code CODUSNSRC_DST. These two field are in the same table in addirion to the quantity transferred.

The code Qlikview I wrote, but I'am not sure if it is correct:

Directory;
USINE:
LOAD CODUSN,
CODREG,
SIGUSN
FROM
[..\QVD\USINE.qvd]
(
qvd);

Directory;
USN_SRCDST:
LOAD //CODUSN,
CODUSN AS CODUSNSRC_DST,
// CODREG,
CODREG AS CODREGTRANSF,
//SIGUSN,
SIGUSN AS LIB_USNSRCDST
FROM
[..\QVD\USINE.qvd]
(
qvd);

My question is, is this coorect?

2. I want to display the quantity transferred between the regions using a third table named REGION as follow:

Directory;
REGION:
LOAD CODREG,
SIGREG AS SIGREGTRANSF
FROM
[..\QVD\REGION.qvd]
(
qvd);

But the result is not correct. It shows me only the transfers Inside each region and not between the regions.

Attached the result of the pivot table.

Thank you very much in advance,

Kind regards,

Abdallah

1 Solution

Accepted Solutions
bc-thebruuu
Creator
Creator

i am not sure to get it but ...

as far as I understand

You need two region tables

source region and target region

View solution in original post

8 Replies
YoussefBelloum
Champion
Champion

Hi,

what is your table structure ?

to be able to see the Quantity movement between regions, you must have something like this (as data strcuture):

Quantity     |    the region from which comes the quantity     |     the region to which the quantity is going

absekrafi
Creator III
Creator III
Author

Hi Youssef,

The Table containing the quantity doesn't has source/destination régions but only source/destination factories (CODUSN and CODUSNSRC_DST). The factory code is connected to the region in the Table REGION.

- So I have factory Table connected at the same time to the region table and to the table containing the quantity of the transfert.

- I am trying to display the transfers between region in pivot Table (one dimention region source and the other one destination region.

Thank you,

Abdallah

bc-thebruuu
Creator
Creator

i am not sure to get it but ...

as far as I understand

You need two region tables

source region and target region

sudhirpkuwar
Partner - Creator II
Partner - Creator II

Hi,

Can you please explain more clearly and also share your expected output...

YoussefBelloum
Champion
Champion

No problem, if your table have the source/destination factories and the factories are connected to the regions, just put the source region and destination region as dimensions and the Quantity as a Measure.

try to attach sample data or sample app to take a look at the data structure

Anonymous
Not applicable

is it okay to share your sample data and qvw?

if it is too confidential, just scramble it before sharing thanks

absekrafi
Creator III
Creator III
Author

Thank you I fixed the problem.

I duplicated  the factory and the region tables and renamed their fields names for the destination (destination factory table and destination region table).

Thank you very much.

Thanks to all.

Abdallah

YoussefBelloum
Champion
Champion

You're welcome, don't forget to close the thread