Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

set analysis with date variables

hello everybody,

someone could help me i met an problem with date variable..

I try to put tow date  in an set analysis  but it doesn t work :

  • vYDMIN :  Date(Yearstart(max(%date)),'DD/MM/YYYY') 
  • vYDMIN  :   Date(Max( %date),'DD/MM/YYYY')  

%date is my key calendar ...

This is  my expression  :

sum({$ <%date={">=$(#vYDMIN)<=$(#=vYDMAX)"} >} [Indic.])

Do you know where is problem , i try a lot of solution but all doesn t work

Thank for your help

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Put '=' sign while defining variable.

View solution in original post

15 Replies
Anonymous
Not applicable
Author

did you try $(=vYDMIN) instead of $(#vYDMIN) and also with VYDMAX

another point:

why do you format the variable and in the set expression you assign to origin again.

Is there a difference in the format?

how does %date looks like in format?

marcus_sommer

Try this:

sum({$ <%date={">=$(vYDMIN)<=$(vYDMAX)"} >} [Indic.])

whereat %date needs to formatted like the variables in 'DD/MM/YYYY'. Less error-prone is by calculations with dates and times is to use numeric values with num(%date).

- Marcus

Anonymous
Not applicable
Author

Pierre,

Try this:

sum({$ <%date={">=$(=$(vYDMIN))<=$(=$(vYDMAX))"} >} [Indic.])


Marc.

Not applicable
Author

thanks for all answers,

i  ve tried 

sum({$ <%date={">=$(vYDMIN)<=$(vYDMAX)"} >} [Indic.]) this give 0

sum({$ <%date={">=$(=$(vYDMIN))<=$(=$(vYDMAX))"} >} [Indic.])  it doesn't work, this syntax give me no result


All the data are in good format 'DD/MM/YYYY'  and the variable in text object give the rigth date :


$(vYDMIN)=01/01/2014

$(vYDMAX)=16/09/2014





Anonymous
Not applicable
Author

try once:

sum({$<%date={'>=$(=vYDMIN)<=$(=vYDMAX)'}>} [Indic]

Not applicable
Author

Thank again i ve try but the result is again 0.

Nobody has nay idea about the origin of the problem, i m  desperate ..;)

Anonymous
Not applicable
Author

what should be the result?

please define a listbox with %date and select all dates between 1/1/2014 and 16/9/2014

create a textbox with sum([Indic])

what is the result?

anbu1984
Master III
Master III

Can you post sample app.

tresesco
MVP
MVP

Better idea would be - create a qvw with sample data that demonstrates the issue and share. I am sure that you would get faster resolution.