Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Issue with a variable not working

Hi all,

I have this expression that is working exactly as I want while it is in a text box. However, when I define the expression as a variable it stops working! Do you have any idea why?

=if(GetFieldSelections(OrdItemInsDt)>0,

  (if(GetFieldSelections(OrdItemInsDt)<7,

    date(min(OrdItemInsDt))& ' to ' & date(max(OrdItemInsDt)),

  (if(Left(GetFieldSelections(OrdItemInsDt),3) = '',

  max({<Year-={$(=SubField(GetFieldSelections(OrdItemInsDt),'',2))}>} OrdItemInsDt),

  date(min(OrdItemInsDt)))& ' to ' & if(Left(GetFieldSelections(OrdItemInsDt),3) = '',

  max({<Year-={$(=SubField(GetFieldSelections(OrdItemInsDt),'',2))}>} OrdItemInsDt),

  date(max(OrdItemInsDt)))))),

  $(vLastInsDtWeek))

Thank You!

1 Solution

Accepted Solutions
kuczynska
Creator III
Creator III

Hi,

It could be an issue around using "=" in the variable definition window and using/not using the $ expansion in your expression window. Could you confirm how you are initiating the expression?

thanks,

Micha

View solution in original post

2 Replies
kuczynska
Creator III
Creator III

Hi,

It could be an issue around using "=" in the variable definition window and using/not using the $ expansion in your expression window. Could you confirm how you are initiating the expression?

thanks,

Micha

Anonymous
Not applicable
Author

Thank you Micha!

It was because of the "=" in the variable definition... I thought we should always use it but I was wrong...

Thank you very much for you help!

Sofia