Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
How to do this example ?
Thank you !
Add the date as a dimension in the chart and create a variable to get tomorrow's date ('vTormorrow' in the example expression) and use the following expression:
=SUM(PM) + SUM({<[date]={"=$(=Date($(vTomorrow)))"}>}AM)
Cheers,
Haneesh
Thank haneesh!
I use :
=count({$ < [Heure De Retrait] ={'>= 13'} >} [No Commande]) + count({<[Heure De Retrait] ={'<= 12'}, [Date Retrait]={$(= date([Date Retrait]+1, 'DD/MM/YYYY'))}>}[No Commande])
You see an error ?!
In your set analysis expression you are doing the date manipulation directly and this could cause issues at times. so, try creating a variable as follows,
vTomorrow = date([Date Retrait]+1)
and use this variable in the set analysis as follows,
=count({$ < [Heure De Retrait] ={'>= 13'} >} [No Commande]) + count({<[Heure De Retrait] ={'<= 12'}, [Date Retrait]={"=$(=Date($(vTomorrow)))"}>}[No Commande])
I used vTomorrow
but this part " count({<[Heure De Retrait] ={'<= 12'}, [Date Retrait]={"=$(=Date($(vTomorrow)))"}>}[No Commande]) "
is always =0
what is the expression used to define 'vTomorrow'?
Try changing
[Date Retrait]={"=$(=Date($(vTomorrow)))"}
to
[Date Retrait]={"$(=Date([Date Retrait] + 1))"}
I have run into wierd problems using a date variable in a set analysis expression before, because QV evaluated the date as a division - e.g. 28/12/11 was being interpreted as 28 divided by 12 divided by 11. This might be happening to you too.
vTomorrow = date([Date Retrait]+1)
Thank for the reply.
I tried to change
[Date Retrait]={"=$(=Date($(vTomorrow)))"}
to
[Date Retrait]={"$(=Date([Date Retrait] + 1))"}
but it's always = 0
I used :
count({<[Date Retrait]={"=$(=Date($(vTomorrow)))"}>}[No Commande]) : Not OK
count({<[Date Retrait]={$(=Date($(vTomorrow)))}>}[No Commande]) : Not OK
count({<[Date Retrait]={"$(=Date([Date Retrait] + 1))"}>}[No Commande]) : Not OK
count({<[Date Retrait]={$(=Date([Date Retrait]+1))}>}[No Commande]) : Not OK
count({<[Date Retrait]={"29/12/2011"}>}[No Commande]) : OK