Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
May I know how can make the below script with the help of Set Analysis. I tried but not sure how use >= and <= in Set Analysis. It is taking up only if I use = but it is not taking up when I use >= and <=.
Can someone please do the required changes in the below script.
Sum(if(DATE >= vCurMonthStartDate
AND DATE <= vCurMonthEndDate
AND TRANS_DATE >= vCurMonthStartDate
AND TRANS_DATE <= vCurMonthEndDate
AND CATEGORY='MARKETING',SALES))
Thanks
Attitude
Try this:
SUM({<DATE={">=$(vCurMonthStartDate)<=$(vCurMonthEndDate)"} ,TRANS_DATE ={">=$( vCurMonthStartDate)<=$(vCurMonthEndDate)"} ,CATEGORY={'MARKETING'}>}SALES)
Hi,
Or try this:
sum ({< field = {">value"} , field={"<value"},....>} sales)
Hi,
Just try the below expression
sum({<DATE = {'>=$(vCurMonthStartDate)'}, DATE ={'<=$(vCurMonthEndDate)'},TRANS_DATE ={'>=$(vCurMonthStartDate)'}, TRANS_DATE = {'<=$(vCurMonthEndDate)'}, CATEGORY={'MARKETING'}>}SALES);
Hi All
Sorry for replying so late. I tried with the solution that has been provided to me but unfortunately none of them are working. It is not giving the same result what "IF Statement" has provided.
All the Set Analysis looks to be fine only but not sure why it is not giving the expected result. Is it becuase that we have missed out "AND" in the set analysis?
Regards
Attitude
Hi,
Try this.
SUM({<DATE={">=$(#vCurMonthStartDate)<=$(#vCurMonthEndDate)"} ,TRANS_DATE ={">=$(#vCurMonthStartDate)<=$(#vCurMonthEndDate)"} ,CATEGORY={'MARKETING'}>}SALES)
Regards,
Kaushik Solanki
Hi,
you don't need to use the 'AND' within the set analysis. Use it like Kaushik Solanki posted. I also have such statements in usage.
sum({$<MonthYear={'>=$(vMY_FromDate) <=$(vMY_ToDate)'}>} Amount)
This will sum up the all amount values from vMY_FromDate till vMY_ToDate.
vMY_FromDate and vMY_ToDate are variables which you have to define and set in dependency to your calendar.
Hope it helps.
Regards,
Claudio
Liv$Good
On Aug 23, 2011 11:22 PM, "scacchic" <qliktech@sgaur.hosted.jivesoftware.com