Looping and checking load in Qlikview

I want to create two tables in qlikview; one is called Station and one is called Trains. I planned to apply the instruction QUALIFY, so any matching fields between the two tables are not confused.

However, data for each table is loaded from multiple spreadsheets using a loop FOR EACH .... This means that, determining the load, several tables are created: Station-1, Station-2, Station-3, etc. With equally consistent field names.

Is there a way that I can execute the semi- QUALIFYmy load statement, so that all all the fields are preceded either by “Station”. or "Trains." without using a different name for the data coming from each individual table?

+4
source share
2 answers

Concatenate station tables before qualifying column names.

Something like the following:

[Station]:
  LOAD [col1], [col2]
  FROM [Station1.xls]

[Station2]:
  CONCATENATE (Station)
  LOAD [col1], [col2]
  FROM [Station2.xls]
+3
source

I would try to avoid qualifications in general. For many scenarios, common fields in different tables tell you the date Qualify helps you ignore it.

What connection do you want between trains and station tables? Make sure you understand the mechanism for combining QVs, as well as the fields that you want to associate.

, Concatenate , . , , . , , , , if() .

. IF Match ('$ (vFieldName)', 'FUELCODE'),               SET vFuel = 'FUELCODE';           ELSEIF Match ('$ (vFieldName)', 'FLDCD_TR'),               SET vFuel = 'FLDCD_TR';           ENDIF

,

+1

Source: https://habr.com/ru/post/1536086/


All Articles