Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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.

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.