Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Not applicable

How to remove some data of a Field and split into the number of sub Fields

Hi,

I am creating one QVW file in my project by taking the QVD file as a data source. In this QVD one of the field called HeaderDateKey has the data like,

C:\Project\QlikView\CAR\QVD\INPACT\CAR.QVD_2011-09-27.

But I would like to display the output as three fields like,      

ApplicationName      QVDName            LoadDate

CAR                           CAR.QVD             2011-09-27

How can we spilt the data and show in number of subfields.

It would be the greate help.

Thanks in advance................

Regards,

Praveen

2 Replies

Re: How to remove some data of a Field and split into the number of sub Fields

Hi Praveen,

I already answered you in your previous post. Since you are building the QVW file, you can create the name of the QVD to fit easiest your needs, but as it is now, using a few string functions will do

LOAD SubField(FileName(), '.', 1) AS ApplicationName,    

     SubField(FileName(), '_', 1) AS QVDName,    

     Date(Date#(SubField(FileName(), '_', 2), 'YYYY-MM-DD')) AS LoadDate,

...

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

P.S.: Posting once is usually enough to get an answer, since most of us follow all communities. Posting twice may confuse and create different threads and answers for the same issue. Hope you understand.

Re: How to remove some data of a Field and split into the number of sub Fields

Hi,

In the load you can use some thing like below

Load,

HeaderDateKey,

Right(subfield(HeaderDateKey, '.',1),3) as ApplicationName,

Mid(HeaderDateKey, 36,7) as QVDName,

Right(HeaderDateKey, 10) as LoadDate

From Data

See the attached sample file also it is example.

Rgds

Anand