2 Replies Latest reply: Mar 5, 2012 4:44 PM by RJ RSS

Chart expression using max, if, count and distinct

RJ

Im trying to get an expression to work without using script

 

This chart expression correctly counts the number of call numbers where the job (call) has been completed on time

 

 

COUNT (DISTINCT (IF(DATEIN>DATEFSR,CALLNO)))

 

 

This chart expression also works

 

max({1}TOTAL <CALLNO> DATEFSR)

 

It calculates the maximum date for each call number

 

 

But when I combine the two as follows:

 

COUNT (DISTINCT (IF(

max({1}TOTAL <CALLNO> DATEFSR)

< DATEIN,CALLNO)))

 

It doesn't calcualte the correct totals. It just gives a null value or zero

 

 

I can calculate the max date in script and then it works fine but would prefer to do this all in a table chart expression if possible

 

 

Thanks for any help