Hi All,
SQL2005/CRXI.
I am calculating Laboratory Test Per patient for the year
2008 and 2009 by dividing (Number of Patient/Number of Lab Test Volume) and then calculating Variance like following.
Lab Test Per Patient for 2008 (@TPP2008)
if DistinctCount({@2008Case}, {@GroupOne}) > 0 then
Count ({@2008Case}, {@GroupOne})/DistinctCount({@2008Case}, {@GroupOne})
else
0
Lab Test Per Patient for 2009 (@TPP2009)
if DistinctCount({@2009Case}, {@GroupOne}) > 0 then
Count ({@2009Case}, {@GroupOne})/DistinctCount({@2009Case}, {@GroupOne})
else
0
Variance Calculation
if {@TPP2008} > 0 then
(({@TPP2009}-{@TPP2008})/{@TPP2008})*100
else
0
I would like to sort my report based the above mention Variance Calculation formula as it does not allow me to insert summary based on that formula and also it is not available Group Sort Expert.
Any help in this regard will be appreciated.
Thanks
Naved Altaf
SQL2005/CRXI.
I am calculating Laboratory Test Per patient for the year
2008 and 2009 by dividing (Number of Patient/Number of Lab Test Volume) and then calculating Variance like following.
Lab Test Per Patient for 2008 (@TPP2008)
if DistinctCount({@2008Case}, {@GroupOne}) > 0 then
Count ({@2008Case}, {@GroupOne})/DistinctCount({@2008Case}, {@GroupOne})
else
0
Lab Test Per Patient for 2009 (@TPP2009)
if DistinctCount({@2009Case}, {@GroupOne}) > 0 then
Count ({@2009Case}, {@GroupOne})/DistinctCount({@2009Case}, {@GroupOne})
else
0
Variance Calculation
if {@TPP2008} > 0 then
(({@TPP2009}-{@TPP2008})/{@TPP2008})*100
else
0
I would like to sort my report based the above mention Variance Calculation formula as it does not allow me to insert summary based on that formula and also it is not available Group Sort Expert.
Any help in this regard will be appreciated.
Thanks
Naved Altaf