Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a table which has a field called Forecast Version. The Forecast Version field contains three records which have the following name structure 'POR 2H13'. Is it possible to rename the recodr name during a load so that, for example, POR 2H13 becomes POR2H13?
Cheers,
John
Hi John
this solution is for field name not for content
you must use
trim(ForecastVersion) as ForeCastVersion
or purgechar(ForeCastVersion,' ') as ForeCastVersion
best regards
chris
Hi,
You can use Purgechar(yourField, ' ')
JV
BI Experience | A place to share our Business Intelligence experiences
Yes, that should be possible, for example like
LOAD
if([Forecast Version] = 'POR 2H12','POR2H13', [Forecast Version]) as [ForecastVersion],
...
FROM ...;
or
LOAD
purgechar([Forecast Version], ' ') as [ForecastVersion],
...
FROM ..;
Hi John
if POR 2H13 is the field name then use
LOAD
"POR 2H13" as POR2H13
if POR 2H13 is the content then use
LOAD
trim(fieldname) as fieldname
best regards
chris
Hi Guys
My Load statement looks like this
FACTS:
Load
Data,
ForecastVersion,
Market,
Printer,
Measure,
Technology,
Geography,
ShipDate,
Date(Date# (ShipDate , 'YYYYMM'),'MMM-YY') as Date
VersionData:
LOAD Distinct
ForecastVersion
RESIDENT FACTS;
THe content of ForecastVersion is
Current
POR 1H13
POR 2H13
I wan t to cahnge this to (spaces removed) :
Current
POR1H13
POR2H13
The solution suggested does not work:
LOAD
"POR 2H13" as POR2H13
Qlikview sees this as a load from my source data. Can you help me in understanding how to incorporate the code into the script correctly please?
Hi ,
Use the code as below in the load statement .
PurgeChar(ForecastVersion,' ') as ForecastVersion
Regards
Yusuf
Hi John
this solution is for field name not for content
you must use
trim(ForecastVersion) as ForeCastVersion
or purgechar(ForeCastVersion,' ') as ForeCastVersion
best regards
chris
Hi ,
You can Use this code aslo in the load statement .
Replace(ForecastVersion,' ','') as [ForecastVersion]
here in bracket after FieldName 2 nd Paramater (' ') one space is there and 3 rd Paramater ('') no space is there.
Regards,
Ravikant.
HI All,
Thanks so much for the very helpful and quick replies. It's great to see that the solutions are simple and straightforward. I'm lerarning all the time