するためのZでトップ3を取得する方法: 私のコード:ダイアグラムのSSRS:
SELECT *
FROM (
Select top 3
intervaldate as Datum
,Name
,teamname as Team
,SUM(case when CounterName = 'Blown away' then calculationUnits else 0 end) as Blown
,Sum(case when CounterName = 'Thrown away' then calculationUnits else 0 end) as Thrown
,Sum(case when CounterName = 'total' then calculationUnits else 0 end) as Total
from Counting
where IntervalDate >= dateadd(day,datediff(day,1,GETDATE()),0)
AND IntervalDate < dateadd(day,datediff(day,0,GETDATE()),0)
and Name in (Select SystemID from tSystemView where SystemViewID = 2)
group by intervaldate, teamName, Name
) c
式:
=Sum(Fields!Blown.Value + Fields!Thrown.Value)/Sum(Fields!Total.Value) * 100
にそれをソートしかし、それは私の右の順に表示されません。 私はそれがトップ3その後、私は他の値を示し、すべての「名前」を選択した場合:
なぜ外部の「選択」ステートメントが必要ですか?何か不足していますか? –