Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Can Any one tell me that how can i use the below function in the Set Analysis the coding I am using as below.
Prorate Coding for monthly target = if(date(vToday)=date(vToday) and date(vToday)<=monthend,sum((Del_Target)/Del_No_Day)*(day(vToday)-1),sum((Del_Target)/Del_No_Day)*day(monthend))
Actual sales Quantity = sum(QTY)
Below set is working but it capture the total monthly target rather then the prorate target.
Set Analysis= Count({$<[Parent Code]={'=sum(QTY)/(Monthly_Target)'}>} DISTINCT [Parent Code])
# Replacing the {'=sum(QTY)/(Del_Target)'} by = sum(QTY) / if(date(vToday)=date(vToday) and date(vToday)<=monthend,sum((Del_Target)/Del_No_Day)*(day(vToday)-1),sum((Del_Target)/Del_No_Day)*day(monthend))
Please suggest how to use the Prorate Target rather then Monthly_ Target.
INsert the cndition function in a variable, and use the variale in set analysis.
Dear Mario,
# Replacing the {'=sum(QTY)/(Del_Target)'} by = sum(QTY) / if(date(vToday)=date(vToday) and date(vToday)<=monthend,sum((Del_Target)/Del_No_Day)*(day(vToday)-1),sum((Del_Target)/Del_No_Day)*day(monthend))
In the above expression i am using the Variable i.e. vToday.
Table fields
Del_No_Day
Del_Target
QTY
Can u explain me in details how to create the prorate variable
vCondition=
sum(QTY) / if(date(vToday)=date(vToday) and date(vToday)<=monthend,sum((Del_Target)/Del_No_Day)*(day(vToday)-1),sum((Del_Target)/Del_No_Day)*day(monthend))
and Replacing the {'=sum(QTY)/(Del_Target)'} by {$(vCondition)}
Mario,
I am getting the below error while Loading.
Aggregation expressions not allowed in GROUP BY clause
Let VCondition= sum(QTY) / if(date(vToday)=date(vToday) and date(vToday)<=monthend,
sum((Del_Target)/Del_No_Day)*(day(vToday)-1),sum((Del_Target)/Del_No_Day)*day(monthend))
their are two table in one table the Monthly Target and other table the Quantity.
to join two table i have created a key.
you can't use this in scripting
for scripting each user field should be in the same table.
Why do you wan't to do this in scripting and not via an expression in a straight table ?
Dirk
My instructions are not for scripting, but for use in presentation...in scripting you can't use it!