Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I want to show sum the values falling between two dates in a textbox . Below are the steps which i followed so far
=Sum({$<closeDate = {">=$(venddate) <=$(vEndDate) "}>} sales)
Can anyone help me on to correct the syntax
Many thanks
Ashish
its mm/dd/yyyy
in varibes
i m using today() and makedate function to create date
use today() function in a text box and verify that the date format in closeDate field matches the date format of Today(). Secondly also make sure that the date format in vStartDate is mm/dd/yyyy
its showing correct 10/26/2013
Have you tried what I suggested above, evaluating the QV functions in the variable definition?
See also:
Not all variables are created equal » The Qlik Fix! The Qlik Fix
hi
I tried almost all the options but its still showing zero but if i pass dates like below
=(sum( {$<closedate = {">=1/1/2012 <=6/1/2012"} >} Sales))
it works fine
Could you share you sample app? See, Preparing examples for Upload - Reduction and Data Scrambling
I believe the issue is the dollar-sign expansion is returning the date string but you are trying to perform a numeric range search. I have noticed before that it seems sometimes QlikView evaluates text search you might be able to make on list boxes and searches you can specify in Set Analysis differently.
Try the following:
=Sum({$<closeDate = {">=$(#venddate) <=$(#vEndDate) "}>} sales)
The dollar-sign pound should force the dollar-sign expansion to return the numeric value of the dual valued date which has both a string value and number value.
hey ashish try this then,
sum(if(closedate>=vStartDate and closedate<=vEndDate,Sales))
i think u'l take calendar object fo both startdate and end date, in both objects, assign these following values to its range
min= min({1}Date(CloseDate))
max=date(reloadtime())
hope this helps you
try this
for a given day to any number of day. here i have taken n=14 day
Sum
({$<Date_id = {">=$(=(Date_id))<=$(=(date(num(Date_id)+14)))"}>} [field])
Hi all,
I am getting the same, value as 0.
My expression is
Sum({$<Date = {">=$(#vStartDate1) <=$(#vEndDate1) "}>} OnboardCount).
Can anyone tell what the problem is?
Thanks in advance
Vidhya