Discussion Board for collaboration related to QlikView App Development.
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
May be just try with LET like:
LET SelectSpKostnader = 'FirstSortedValue({<Målkortsdatum ={"<='&'$'&'(=SVDate)"}>}[SP Kostnader],-[Målkortsdatum])';
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) & '}';
May be just try with LET like:
LET SelectSpKostnader = 'FirstSortedValue({<Målkortsdatum ={"<='&'$'&'(=SVDate)"}>}[SP Kostnader],-[Målkortsdatum])';
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.