Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
azimabadi
Creator III
Creator III

Problem with $ in Variable Definition in Script

Hi.

i define variables in my script. i read some data from excel fiels and construct my variables. but i have a problem wit $ in defination.

consider this :

SET yearString='Kalender.Jahr';

SET sumString = 'Field_a - Field_B';

LET mainString = '( sum ({<' &

  yearString & '={"' & '$' & '(=max(Kalender.Jahr)-' & n & ')"}>} ' &

  sumString & ' ))';

i need to get the following:

( sum ({<Kalender.Jahr={"$=max(Kalender.Jahr)-1"}>} Field_a - Field_B )) 

insted the answer is:

( sum ({<Kalender.Jahr={"(internal error)"}>} Field_a - Field_B )) 

what that is really intersting is that i used the same syntax in another qvw and it works as i expected.

Best Regards

Peyman

1 Solution

Accepted Solutions
aadilmadarveet
Specialist
Specialist

pleace check attached..

hope that helps..

View solution in original post

4 Replies
aadilmadarveet
Specialist
Specialist

just tried your script to calculate the variables..

works perfectly well.. as your expected result..

azimabadi
Creator III
Creator III
Author

as i said it works in one qvw and exactly same syntax gives me 'Internal Error'.

azimabadi
Creator III
Creator III
Author

here i attach the example where i get 'Internal Error'.

aadilmadarveet
Specialist
Specialist

pleace check attached..

hope that helps..