Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am using the variable
eMarginToday = SUM({$<Datum={"$(=Date(Max(Datum)-1))"}>}Margin)
in my qvw and it is working as expected. Now I wanted to move the definition of the variable to the script
SET eMarginToday = (SUM({$<Datum={"$(=Date(Max(Datum)-1))"}>}Margin));
but when the script is reloaded the variable looks like this in the variable editor: (SUM({$<Datum={""}>}Margin))
Any idea how I could prevent that?
Kind Regards,
Nigel
Try like this:
Orders:
Load
*
From Orders.csv;
Dates:
LOAD
max(ORDERS_DT) as MaxDate,
min(ORDERS_DT) as MinDate
Resident ORDERS;
LET vMaxDate = Peek('MaxDate',0,'Dates');
LET vMinDate = Peek('MinDate',0,'Dates');
DROP Table Dates;
TIMEDIM:
LOAD
Date($(vMinDate) + (IterNo()-1)) as Date
Autogenerate 1
while $(vMinDate)+ (IterNo()-1)<= $(vMaxDate);
Hmm.. you are generating a calendar between min and max date... This is not really what I was asking for, but maybe my question is unclear. I want to define the above mentioned variable already in the script.
Thanks Sunny,
in the meantime I tried Stop Dollar Sign Expansion in the script (Escape Character ??? ) and this worked for me!