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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Doubts about subfield function and if

Hi everybody. Im working on an application and i´m having problems with an if statement.

I´ll put the code.

  IF(Account'), '-', 2) = 'current', 'current', 'no current') AS Test

The accounts are like this 210453001-1-Current or 210453001-1-NoCurrent and i have to identify if they have the current or non current at the end, and put that on a new field.

Thank you all!

Greetings.

Labels (1)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

You certainly have some typo's.

Put this as the expression in a Text Object

     =subfield ( '210453001-1-Current' , '-', 3)

This will display 'Current' , so shows you need subfield 3 and not 2.

View solution in original post

2 Replies
MK_QSL
MVP
MVP

IF(Subfield(Account,'-',-1)='Current','Current','No Current') as Test

Anonymous
Not applicable
Author

You certainly have some typo's.

Put this as the expression in a Text Object

     =subfield ( '210453001-1-Current' , '-', 3)

This will display 'Current' , so shows you need subfield 3 and not 2.