Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
patrickbender
New Contributor III

How to not evaluate $ sign

Hi i have the following variable set up at the end of the LOAD script:

Set SelectSpKostnader = FirstSortedValue({<Målkortsdatum ={"<=$(=SVDate)"}>}[SP Kostnader],-[Målkortsdatum]);

SInce the $  sign evaluates duing the load statement it is not dynamic afterward and doesn't refer to the variable anymore.

Futhermore as the variable is empty during the loadscript the end result is like this:

FirstSortedValue({<Målkortsdatum ={"<="}>}[SP Kostnader],-[Målkortsdatum])

Any Ideas of how to avoid this?

I want this variable to load as it is on the second row.

Thank you for all the amazing help i get from this forum

1 Solution

Accepted Solutions
MVP
MVP

Re: How to not evaluate $ sign

May be just try with LET like:

LET SelectSpKostnader = 'FirstSortedValue({<Målkortsdatum ={"<='&'$'&'(=SVDate)"}>}[SP Kostnader],-[Målkortsdatum])';

3 Replies
olivierrobin
Valued Contributor III

Re: How to not evaluate $ sign

replace $ par chr(36)

and rewrite your command by using chr(39) for single quote

example :

set vSetAnalysis_MaxMois_M_1= 'Mois=,id_mois={' & chr(39) & chr(36) & '(vMax_Mois_M_1)' & chr(39) & '}';

MVP
MVP

Re: How to not evaluate $ sign

May be just try with LET like:

LET SelectSpKostnader = 'FirstSortedValue({<Målkortsdatum ={"<='&'$'&'(=SVDate)"}>}[SP Kostnader],-[Målkortsdatum])';

patrickbender
New Contributor III

Re: How to not evaluate $ sign

Thank you!

I tried both and they worked very well, I marked the second answer as correct because that's what I ended up using as that was easier to read.