简体   繁体   中英

Join Two Dataset In One SSRS Chart Report

i Have two data sets. First one dataset shows Total counts against each person and the Second one Dataset shows SLA breached counts against respective person. As before i used two charts for for the above datasets and result will be achieved but now i want these two datasets result in just one chart. kindly tell me how to do this to achieve desired result. Dataset 1 (Total Counts query is):

Select Count(I.Id) AS TotalId,
U.Firstname AS Username
From I
Group U.Firstname

Dataset 2 (SLA Breached query is):

Select Count(I.Id) AS BreachedId,
U.Firstname AS Username
From I
***Where I.ResolvedDate > I. ResolvedByDate***
Group U.Firstname

The highlighted query is just used in dataset 2 which shows SLA Breached counts. Rest of the query in both dataset are same. so now i don`t know how show toghether. I used union all function but it add both TotalId and BreachedId.

Thanks

AhsanMisbah

Do you want both aggregates to appear in the same query? if so change your select to

select  U.Firstname AS Username, Count(I.Id) AS TotalId, nullif(SUM(case when I.ResolvedDate > I. ResolvedByDate then 1 else 0 end ),0) as Breached

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM