How to take the percentages well in report foot teleriks Q3 2013

1

Very good afternoon, I am trying to create a report in teleriks with the assistant, trying to make a foot, where I show the percentage of projects canceled vs the projects created, the graphic does it well, however it gives me all the 100% values, when I should give projects canceled 18%.

This is my query in SQL Server:

SELECT FORMAT((((SELECT COUNT(*) FROM Proyectoes WHERE estatusId = (SELECT idEstado FROM estatus WHERE Estatus = 'Canceled')) *100/(SELECT COUNT(*) FROM Proyectoes))),'') AS 'Canceled Projects Percentage',
(SELECT COUNT(*) FROM Proyectoes) AS 'Total Projects',
(SELECT COUNT(*) FROM Proyectoes WHERE estatusId = (SELECT idEstado FROM estatus WHERE Estatus = 'Canceled')) AS 'Total Canceled'

This is the result:

  

Canceled Projects Percentage 18

     

Total Projects 2

     

Total Canceled 11

And this is the graphic created by the wizard

My question would be, How to make the report give me the true percentages instead of giving me 100% in everything?

    
asked by Ricardo Rios 24.04.2016 в 02:45
source

0 answers