Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
I´m having a problem....
I´ve got several Date fields in my Data and I need to be able to select one of those dates based in a variable that is storing another date.
Date fields:
-Data;
-dataVenda.
Variable:
-vSetData =dataVenda
This variable captures date from "dataVenda". Used in a Text Box it returns the Date just fine. Text box, i´m using =vSetData
Now my problem is that I cannot use vSetData in Set Analysis... I´ve tried several expressions, and none of them worked.
My expression is plain simple, just a sum with set analysis:
Sum({$<Data={???????}>} Afield)
If I use, for instance, Sum({$<Data={'26-09-2012'}>} Afield) it works fine.
I´ve used $(vSetData), =vSetData, some expressions with '=$(=vSetData)', I don´t know how many expressions have I tried... 😕
I need to use Data, because is the one directly related to the field I need to Sum.... I cannot use dataVenda directly in here...
Best Regards,
Bruno Silva.
vSetData =Date(dataVenda)
Sum({$<Data={'$(vSetData )'}>} Afield)
Hi
Does the text box with =vSetData return anything when you clear all selections? If the answer is no, then you cannot use vSetData in the way you are attempting. If you need to use all the possible values (after making selections) of dataVenda, then you could try:
Sum(<Data = P(dataVenda)>} Afield)
HTH
Jonathan
Hi Jonathan!
I wasn´t looking for All Possible values... But thanks anyway!!! Manish gave the right answer... I knew that it was a minor detail...
Thank you both!!!
Best Regards,
Bruno Silva.
Why doesn´t this work the same way when I create a new variable to Last Year same date:
vSetDataLY =AddMonths( dataVenda, -12)
And then use it as I did before?
Sum({$<Data={'$(vSetDataLY )'}>} Afield)
This doesn´t work... But in a Textbox, It does return the correct date with =vSetDataLY
Best regards,
Bruno Silva.
Try
vSetDataLY =Date(AddMonths( dataVenda, -12))
Didn´t work....
As the Text Box returns correct date, I´m guessing that is something about how the variable is implemented in Set Analysis... But again, tried several ways to call the vSetDataLY in Data=, but any results so far...
Thanks,
BS.
Try
vSetDataLY = Date(AddYears(dataVenda,-1),'DD-MM-YYYY')
It doesn´t work either...
But the Text Box is still returning the right date...
what is the format of Data?