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

New to Data Manipulation with Qlikview

Hey guys

I'm new with Qlikview, basically read and "learn" it the past two weeks at a new internship I got. 

They want me to create a script or code that allows to transform data from a .qvd file that is already into qlikview but as a dashboard/table, into a csv file (they told me specifically that they want the csv file with a different format and to be able to do it automatically). You can see the following image, which is how the data is from the current qvd file (pls dont mind the language, you cant tell me the answer with different names). 

01.jpg

What I want is to do the following:

02.jpg

*This needs to be the exact order as in the image above.

Basically is to separate the data in the following columns: Clave (which comes from the qvd downloaded), Reporte (which will be a value giving in the code and will apply to all the records), Tipo (which can either be 14 or 4, which comes from the combination of Clave and MX/ME, 14 = MX and 4 = ME, which you have to put the both) and Monto ( which comes from the number of MX and ME). 

What I have right now is just a table with CLAVE, Tipo (I have it as MX/ME), and Monto, but i need to change that MX/ME into 14/4, and I need to add the REPORTE ( only one value of 111).

I need to combine the data into that format and then export it into a csv file, because the data needs to be upload it into a different platform that specifically requires that format (there are about 1800 records, which end up being 3600 records). 

 

 

PLSS HELP!!!!

1 Solution

Accepted Solutions
ahaahaaha
Partner - Master
Partner - Master

Hi,

may be like this?

Table1:
LOAD*,
'III' as Reporte; // This line should be added to the load of qvd
Load * Inline //there may be a load from yours qvd
[Clave, Tipo, Monto
100000000,14,100
100000000,4,4
1010000000,14,20
1010000000,4,4];

//if the order of the fields is important, overload the table.

//In principle, the required sequence of fields can be ensured when loading data from qvd
NoConcatenate
Table2:
LOAD
Clave,
Reporte,
Tipo,
Monto
Resident Table1;

DROP Table Table1;

//upload data to csv
STORE Table2 into data.csv;

 

View solution in original post

1 Reply
ahaahaaha
Partner - Master
Partner - Master

Hi,

may be like this?

Table1:
LOAD*,
'III' as Reporte; // This line should be added to the load of qvd
Load * Inline //there may be a load from yours qvd
[Clave, Tipo, Monto
100000000,14,100
100000000,4,4
1010000000,14,20
1010000000,4,4];

//if the order of the fields is important, overload the table.

//In principle, the required sequence of fields can be ensured when loading data from qvd
NoConcatenate
Table2:
LOAD
Clave,
Reporte,
Tipo,
Monto
Resident Table1;

DROP Table Table1;

//upload data to csv
STORE Table2 into data.csv;