select territoryId from request.qmd_userTerritoryHierarchy where localMarket = 1 and territoryId in ( ) select * from qmd_hierarchyRollup_detail where subjectId = and territoryId = select targetVolume as tyBudget, actualVolume as tyActual, actualVolumePrior ytdPrior, remainingBaselineVolume as lyActual, planVolumeImpact as tyImpact, opportunityCount , ytdRunRateVol as ytdRunRate, remainingBudgetVol as remainingBudget, runRateNeededVol as runRateNeeded, weeklyGapVol as weeklyGap, potentialGapVol as potentialGap, remainingGrowthVol as remainingGrowth , targetVolumeToDate as ytdBudget, projectedVol as tyProjected , #_f#Vol as #_f# targetAlt as tyBudget, actualAlt as tyActual, actualAltPrior ytdPrior, remainingBaselineAlt as lyActual, planAltImpact as tyImpact, opportunityCount , ytdRunRateAlt as ytdRunRate, remainingBudgetAlt as remainingBudget, runRateNeededAlt as runRateNeeded, weeklyGapAlt as weeklyGap, potentialGapAlt as potentialGap, remainingGrowthAlt as remainingGrowth , targetAltToDate as ytdBudget, projectedAlt as tyProjected , #_f#Alt as #_f# targetValue as tyBudget, actualValue as tyActual, actualValuePrior ytdPrior, remainingBaselineValue as lyActual, planValueImpact as tyImpact, opportunityCount , ytdRunRateVal as ytdRunRate, remainingBudgetVal as remainingBudget, runRateNeededVal as runRateNeeded, weeklyGapVal as weeklyGap, potentialGapVal as potentialGap, remainingGrowthVal as remainingGrowth , targetValueToDate as ytdBudget, projectedVal as tyProjected , #_f#Val as #_f# from qmd_hierarchyRollup where territoryId = select targetVolume as tyBudget, actualVolume as tyActual, actualVolumePrior ytdPrior, remainingBaselineVolume as lyActual, planVolumeImpact as tyImpact, opportunityCount , ytdRunRateVol as ytdRunRate, remainingBudgetVol as remainingBudget, runRateNeededVol as runRateNeeded, weeklyGapVol as weeklyGap, potentialGapVol as potentialGap, remainingGrowthVol as remainingGrowth , targetVolumeToDate as ytdBudget, projectedVol as tyProjected , #_f#Vol as #_f# targetAlt as tyBudget, actualAlt as tyActual, actualAltPrior ytdPrior, remainingBaselineAlt as lyActual, planAltImpact as tyImpact, opportunityCount , ytdRunRateAlt as ytdRunRate, remainingBudgetAlt as remainingBudget, runRateNeededAlt as runRateNeeded, weeklyGapAlt as weeklyGap, potentialGapAlt as potentialGap, remainingGrowthAlt as remainingGrowth , targetAltToDate as ytdBudget, projectedAlt as tyProjected , #_f#Alt as #_f# targetValue as tyBudget, actualValue as tyActual, actualValuePrior ytdPrior, remainingBaselineValue as lyActual, planValueImpact as tyImpact, opportunityCount , ytdRunRateVal as ytdRunRate, remainingBudgetVal as remainingBudget, runRateNeededVal as runRateNeeded, weeklyGapVal as weeklyGap, potentialGapVal as potentialGap, remainingGrowthVal as remainingGrowth , targetValueToDate as ytdBudget, projectedVal as tyProjected , #_f#Val as #_f# from qmd_hierarchyRollup_detail where territoryId = and subjectId = select stageId from qmd_rawStages where stageId in () statusCode in ( ) order by likelihoodPercent select * from qmd_oprOpportunities where not ( typeCode in ( 'NEW', 'INC' ) and statusCode = 'R' ) select sum( volumeImpactaltImpactvalueImpact ) tyImpact, count(distinct opportunityId) opportunityCount from qmd_oprOpportunities select * from qmd_cdrOpportunities where not ( typeCode in ( 'NEW', 'INC' ) and statusCode = 'R' ) select sum( volumeImpactaltImpactvalueImpact ) tyImpact, count(distinct opportunityId) opportunityCount from qmd_cdrOpportunities select #_columnList# from qmd_oprOpportunities union select #_columnList# from qmd_cdrOpportunities union select #_columnList# from qmd_overlapOpportunities select sum( volumeImpactaltImpactvalueImpact ) tyImpact, count(distinct opportunityId) opportunityCount from qmd_overlapPipeline select sum( volumeImpactaltImpactvalueImpact ) tyImpact, count(distinct opportunityId) opportunityCount from qmd_oprOpportunities
  #_numericHeading#
Local Market Plan Status A. O. P. TY Actual LY Act. Bal. Opps. TY Plan Bal. TY Est. Tot. TY Est. Var. %
DistributorOperatorCurrent Year Forecast (note)Current Year Forecast (note) #lsnumberFormat(qmd_salesLookup.tyBudget)# #lsnumberformat(qmd_salesLookup.tyActual)# #lsnumberformat(qmd_salesLookup.lyActual)# #lsNumberformat( _opportunityCount )# #lsnumberformat(_planImpact)# #lsnumberformat(_projection)# #lsnumberformat(_planVar)# #numberformat(_planVarPct,"(9.9)")# DistributorOperatorCurrent Year Forecast (note)Current Year Forecast (note) 0 0 0 #lsNumberformat( _opportunityCount )# #lsnumberformat(_planImpact)# 0 0 0
The above numbers reflect data as of #lsdateformat( dateadd( "d", -1, Now() ))# @ 10:00PM EST
select territoryId from request.qmd_localHierarchy where parentTerritoryId in ( )