sql - SSRS Numbers appear differently than same view in Excel -
in ssrs, have report running pulls sql view, reason showing insanely wrong numbers particular campaign.
for example, getting in ssrs:
ssrs designer: i.stack.imgur.com/lohaf.png
(cant post more 2 links
as opposed exact same view being shown in excel:
it seems lead not have locks or closes being aggregated 1 campaign reason. joining 2 views becuase there data 2 different systems. works flawlessly within excel, stumped why cannot working in ssrs.
i appreciate help.
thanks
sql view code
select * xxviableleadsvelocifyencompassgrpcampaign left outer join xxlocksandcloses on xxlocksandcloses.campaign = xxviableleadsvelocifyencompassgrpcampaign.title
xxviableleadsvelocifyencompassgrpcampaign
select c.[campaignid], c.[title], c.[lead_ct], cast(c.[cost] int) "cost", cast(c.[cost per lead] int) "cost per lead", count(v.leadid) "viable leads", cast(cast(c.[cost] int)/count(v.leadid) decimal(10,2)) "cost per viable lead", cast( cast(count(v.leadid) float)/c.[lead_ct] decimal(10,2)) "viable lead conversion" xxviableleadsvelocifyencompass v inner join xxleadcampaigngrpcountcosts c on v.campaignid = c.campaignid group c.[campaignid], c.[title], c.[lead_ct], c.[cost], c.[cost per lead]
xxleadcampaigngrpcountcosts:
select c.campaignid, c.title, count(leadid) lead_ct, cast(sum(lw.f660) decimal(10,2)) cost, cast(avg(lw.f660) decimal(10,2)) "cost per lead [velocifydb].[dbo].[leadwarehouse] lw inner join campaign c on lw.campaignid = c.campaignid dateadd(hh, 3, lw.createdate) >= '7-5-2016' , lw.campaignid != '225' , lw.campaignid not null group c.campaignid, c.title
xxlocksandcloses
select c.title campaign, count(leadid) locked_loans, sum(case when cx_closing_completion null 0 else 1 end) closed_loans velocifydb.dbo.lead l inner join [encompass_dw].[dbo].[encompass_loandata] e on l.leadid= e.cx_leads360id inner join velocifydb.dbo.campaign c on l.campaignid = c.campaignid lockdate not null , dateadd(hh, 3, l.createdate) >= '7-5-2016' group c.title
Comments
Post a Comment