Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How about like this:
Input data table "data.csv":
Load Script:
Data: LOAD if(left(@1,1)=',',right(@1,len(@1)-1),@1) as String, if(SubStringCount(if(left(@1,1)=',',right(@1,len(@1)-1),@1),',')=0,1,SubStringCount(if(left(@1,1)=',',right(@1,len(@1)-1),@1),',')+1) as CountOfString, len(@1) as LenOfString FROM [D:\Qlikview\Data\data.csv] (txt, codepage is 1252, no labels, delimiter is '\t', msq); Max: load max(CountOfString) as MaxColumns resident Data; let vMaxColumn = peek('MaxColumns',0,'Max'); set vConcat = ; For ind=1 to $(vMaxColumn) step 1 $(vConcat) OneColumn: load subfield(String,',',$(ind)) as ColumnData resident Data ; set vConcat = concatenate(OneColumn); next
It will output something like this:
Use Subfield(). Check here
Syntax: SubField(text, delimiter[, field_no ])
syntax please
Hi,
Please try below function in back-end
=subfield([Requirement Closed Date],',') as [Requirement Closed Date]
Aiolos Zhao
So in this scenario it will return 2018-12-04 10:35:07 what about other date who started with coma (,)
How about like this:
Input data table "data.csv":
Load Script:
Data: LOAD if(left(@1,1)=',',right(@1,len(@1)-1),@1) as String, if(SubStringCount(if(left(@1,1)=',',right(@1,len(@1)-1),@1),',')=0,1,SubStringCount(if(left(@1,1)=',',right(@1,len(@1)-1),@1),',')+1) as CountOfString, len(@1) as LenOfString FROM [D:\Qlikview\Data\data.csv] (txt, codepage is 1252, no labels, delimiter is '\t', msq); Max: load max(CountOfString) as MaxColumns resident Data; let vMaxColumn = peek('MaxColumns',0,'Max'); set vConcat = ; For ind=1 to $(vMaxColumn) step 1 $(vConcat) OneColumn: load subfield(String,',',$(ind)) as ColumnData resident Data ; set vConcat = concatenate(OneColumn); next
It will output something like this: