sql - SSRS Percentage display -


i'm not @ skilled when comes sql i'm trying reflect data percentage. example

times called on enquiry |  contractnumber | enquiry  | percentage display            1                101            claim         14.28%           1                101           complaint      85.71%           2                101           complaint      85.71%           3                101           complaint      85.71%           4                101           complaint      85.71%           5                101           complaint      85.71%           6                101           complaint      85.71% 

so formula work out percentage goes follows [total enquiries contract number / maxrows(contractnumber)]

how achieve this? appreciated

hmmm. assuming using sql server. and, goal percentage. seem ratio of "enquiry" total "contract number". if so, can use window functions:

select e.*,        (count(*) on (partition contractnumber, enquiry) * 1.0 /         count(*) on (partition contractnumber)        ) ratio enquiries e; 

you can want format percentage. done @ application layer.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -