15 Replies Latest reply: Sep 17, 2014 8:22 AM by Pierre Roddaz

# 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

• ###### Re: set analysis with date variables

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?

• ###### Re: set analysis with date variables

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

• ###### Re: set analysis with date variables

Pierre,

Try this:

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

Marc.

• ###### Re: set analysis with date variables

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

• ###### Re: set analysis with date variables

try once:

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

• ###### Re: set analysis with date variables

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

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

• ###### Re: set analysis with date variables

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?

• ###### Re: set analysis with date variables

Can you post sample app.

• ###### Re: set analysis with date variables

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.

• ###### Re: set analysis with date variables

Hi,

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

If not working then attach some sample file with data.

Regards,

Jagan.

• ###### Re: set analysis with date variables

Thanks...

It's not working... i m going to attach an sample file.. but how is working  cause i look quikly and i see only the possibiliies  to insert an picture, video ... is there any others way, i m gonna to prepare the sample file what is the data size max?

thanks

• ###### Re: Re: set analysis with date variables

Click "Use advanced editor" while replying and click attach to attach qvw. Max size is 300MB

• ###### Re: Re: Re: set analysis with date variables

here, there is an small data appli size without dimension....

Thnaks

• ###### Re: set analysis with date variables

Put '=' sign while defining variable.

• ###### Re: Re: Re: set analysis with date variables

yes thank Tresesco... it s better...

But it s an little strange the  value of my two variable give  strange results (in objet text)  :

\$(vYDMIN)=  0.000048.....  in format date 30/12/1899

\$(vYDMAX)=  0.000098.... in format date 30/12/1899

but my expression gives the good results....

Thanks a lot