Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everybody,
We are relatively new to Qlik View and now had a question:
We have downloaded several files using the following path:
FROM
[Blocks \ Scanner Data \ CM project Pluskühlung_VTS NP *]
(OOXML, embedded labels, header lines is 1, table is [Total, Total]);
There are a total of 20 files. These are now with CM project Pluskühlung_VTS NP - 1 and CM-project Pluskühlung_VTS NP - 2, etc. loaded. But we want to get the actual name.
This is in the middle of the actual file name on the 31st to 48th in the file name.
At Google, we have not found a solution to this, with the manual, we also come from nowhere.
Have ye here any advice for me?
many Thanks
Michaela
Where is your actual file name? Is it within data or present in file name (CM project Pluskühlung_VTS NP - 1) ?
Our actual file name is part of the file name
Example: CM Projekt Pluskühlung_VTS NP – West 800…
CM Projekt Pluskühlung_VTS NP – Ost 1000…
We need the part „Ost 1000“ or „West 800” … as part of the field names.
Von: anbu cheliyan
Gesendet: Dienstag, 28. April 2015 17:21
An: Michaela Wittek
Betreff: Re: - Rename tables in Qlik View with the actual name
Load *, Mid(Filename(),31,18) As FileName
FROM
[Blocks \ Scanner Data \ CM project Pluskühlung_VTS NP *]
(OOXML, embedded labels, header lines is 1, table is [Total, Total]);
Use SubFiled function like below:
SubField( FileName , '-' ,2 )
=Mid(Column,31,18) as FieldName
from
.......
Hallo Michaela,
another solution could be also:
LOAD irgendwelchefelder,
Mid(FileBasename(),Index(FileBasename(),'-')+1) as Beschreibung
FROM [Blocks \ Scanner Data \ CM project Pluskühlung_VTS NP *]
(OOXML, embedded labels, header lines is 1, table is [Total, Total]);
This disregards your file extensions and also works for different filename lengths extracting the string starting from the first '-' character.
hope this helps
Gruß
Marco