Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have used get selection with if condition in my variable. Variables are giving desired vales when put individually (Without using = sign).
but while taking in range it fails.
Need Suggestion
vYearStart= If(GetfieldSelections(Month)<=1,(Yearstart(Max(Date),0,4)),
(IF(GetFieldSelections(Month)>1,(MakeDate(Year(Max(Date)),Month(Min(Date)),01)),(Yearstart(Max(Date),0,4)))))
vYearEnd= If(GetFieldSelections(Month)>0, Date(MonthEnd(Max(Date)),'DD/MM/YYYY'), Date((Max(Date)),'DD/MM/YYYY'))
Range : '>=vYearStart<=vYearEnd' : No Result on using Range.
YTD = Sum({<Date={'>=$(vYearStart)<=$(vYearEnd)'}>}Qty) : No Result.
Suggestions Please !!
what is your vYearStart incase user selects more than 1 month??
I would prefer using a master calendar for simpler calculations
Year = {'$(=Max(Year))'}
Month= {'<=$(vMonth)'} where vMonth = your Month Selection!
Hi Vineeth,
In case of more than one selection :
For Example I have Selected : May & June the my vYearStart is 01/05/2016.
Ques : Ideally If i ll select a month in YTD will it give me the result of that particular month or till that month ?
can you post sample app?
Check using one variable at a time
Sum({<Date={'$(vYearEnd)'}>}Qty) << does this evaluate?
Sum({<Date={'>=$(vYearStart)'}>}Qty) << does this evaluate?
Sry, Cant fetch the data out. I ll try to create the sample !!
Meanwhile, can you tell me , is there any limitation of using if condition in the variable ?
Nope, no limits
Single variable doesnot give any result over Sum.
Then the variables are the problem
try
Sum({<Date={'>=$(=vYearStart)<=$(=vYearEnd)'}>}Qty)
or
Sum({<Date={'>=$(=DATE($(vYearStart),'DD/MM/YYYY'))<=$(=DATE($(vYearEnd),'DD/MM/YYYY'))'}>}Qty)
or
Sum({<Date={">=$(=DATE($(vYearStart),'DD/MM/YYYY'))<=$(=DATE($(vYearEnd),'DD/MM/YYYY'))"}>}Qty)