June 13, 2012 at 10:17 am
Hi all,
Can someone help me with this problem. I want to calculate the percentage of certificate posted for a given product that is within 35 days of posting the certificate.
The product has an award date and certificate Posted date. Now I ve wrote an expression to calculate the difference between the award date and Certificate Posted date using = datediff("d", Fields!Awarddate.value,Fields!CertificatePosteddate.value). I did this by creating a new calculated field which I called reg. Now i wrote an expression =iif (Fields! reg.value > 35, "No" "yes" )Now I ve got many yesses which suggests that they are within the 35 days. Now how do I solve the problem to calculate the percentage of posted certificate which are the yesses
June 13, 2012 at 7:45 pm
eobiki10 (6/13/2012)
Hi all,Can someone help me with this problem. I want to calculate the percentage of certificate posted for a given product that is within 35 days of posting the certificate.
The product has an award date and certificate Posted date. Now I ve wrote an expression to calculate the difference between the award date and Certificate Posted date using = datediff("d", Fields!Awarddate.value,Fields!CertificatePosteddate.value). I did this by creating a new calculated field which I called reg. Now i wrote an expression =iif (Fields! reg.value > 35, "No" "yes" )Now I ve got many yesses which suggests that they are within the 35 days. Now how do I solve the problem to calculate the percentage of posted certificate which are the yesses
something like this should work:
=iif(Fields!Reg.Value = "Yes", Count(Fields!Product.Value), 0) / Count(Fields!Product.Value)
if there is a chance that the denominator might be 0 or null, you'll need to do something to handle divide by zero errors. Search this site for divide by zero for a good solution.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply