I´ve got two tables in my Report:
I would like to divide the value from Scrap with the value from Table Total
--> (16227 / 425841) * 100
This is the code:
Select date as Datetime, tevent.name as Event, SUM(value) as sum
from tCount inner join tEvent ON tCount.eventid = tevent.id
where Name in ('Drive Fast', 'Drive Slow')
and date > getdate() -1
and tevent.Name in ('E01','E02','E03','E04','E05','E06','E07','E08')
and CalName = 'Drive'
The sum of these: 'E01','E02','E03','E04','E05','E06','E07','E08', I did it in the report like this: Sum(Fields!E01.Value+Fields!E02.Value+Fields!E03.Value+...
And for the other table it looks like this:
Select date as Datetime, tevent.name as Event, SUM(value) as sum
from tCount inner join tEvent ON tCount.eventid = tevent.id
where Name in ('Drive Normal')
and date > getdate() -1
and tevent.Name in ('E01','E02','E03','E04','E05','E06','E07','E08')
and CalName = 'Drive'
And I must do a division of this two statements. But if I put in the Scrap Expression the value from Total then the result is wrong. Hope you can help me.

