Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

requirement

i have a requirement :

I have below data:

   

field1field2
123123:None
456456:None
345345:None

now the values in colfield2 should be replaced with none ,

how to do that

20 Replies
Anonymous
Not applicable
Author

its not working as none alone is not the value ,

its in combination with other digits,how to write in that

Anonymous
Not applicable
Author

if(len(subfield(field1,:,2)),'',field1) as field2,

but ther is some mistake with this syntax ?

how to achieve the above

Anonymous
Not applicable
Author

this was my code in SAS which am trying to replicate in qlik:

// CASE WHEN TRIM(SUBSTRING(field2,LENGTH(field1)+2)) = 'None' THEN NULL
// ELSE TRIM(SUBSTRING(field2,LENGTH(field1)+2))
// END
// AS field2 /*

how to achieve the above

Anonymous
Not applicable
Author

kindly help and guide as its a urgent requirement

Anonymous
Not applicable
Author

if(len(subfield(field1,:,2)),'',field1) as field2, missed single quotes in the expression i.e delimiter

NullTable:

Mapping Load None , Null() autogenerate 1;

Map Field2 using NullTable;

if(len(subfield(field1,':',2)),'',field1) as field2, -- try this

Anonymous
Not applicable
Author

its not giving the desired output and its not taking the none value

// CASE WHEN TRIM(SUBSTRING(field2,LENGTH(field1)+2)) = 'None' THEN NULL

// ELSE TRIM(SUBSTRING(field2,LENGTH(field1)+2))

// END

// AS field2 /*

the above code needs to be replicated in qlik

avinashelite

try like this

if( subfield(feild2,':',2)='None','',subfield(feild2,':',1)) as feild2

Anonymous
Not applicable
Author

thanks,

and if I need to replicate below in qlik:

Row_Number() OVER (PARTITION BY id ORDER BY date DESC)  AS Rownum


avinashelite

rowno() as Rownum

this should do

Anonymous
Not applicable
Author

will it be like:

Row_Number() OVER (PARTITION BY id ORDER BY date DESC)  AS rowno()

but in qlik we don't have partition by and over