---> select * from qmd_distributorSalesRaw order by forecast_amt desc select * from qmd_lastYearSalesRaw where cdr_recordId =
FY#_calendar2.TY.fiscalYear# YTD Sales By Branch
#lsDateFormat( _planStartDate )# through #lsDateFormat( _planEndDate )# as of #lsdateformat( _asOfDate )#
Distributor TY #qmd_unitOfMeasure.unitOfMeasurePlural# TY Pct. Tot. LY #qmd_unitOfMeasure.unitOfMeasurePlural# LY Pct. Chg. % Chg. TY Dollars TY Pct. Tot. LY Dollars LY Pct. Chg.
#cdr_dstCode# #cdr_dstName# #listfirst( lsnumberformat( val( forecast_qty )), "." )# #lsnumberformat( round( val( forecast_qty )/qtyTotal*100 ), "(9)")#%na #listfirst( lsnumberformat( val( qmd_lastYearSales.forecast_qty )), "." )# #lsnumberformat( round( val( qmd_lastYearSales.forecast_qty )/lyQtyTotal*100 ), "(9)")#%na #lsnumberformat( round( lyChange/val( qmd_lastYearSales.forecast_qty )*100 ), "(9)")#% na #rereplace( lscurrencyFormat( val( forecast_amt )), "\.\d*", "" )# #lsnumberformat( round( val( forecast_amt )/amtTotal*100 ), "(9)")#%na #rereplace( lscurrencyformat( val( qmd_lastYearSales.forecast_amt )), "\.\d*", "")# #lsnumberformat( round( lyChange/val( qmd_lastYearSales.forecast_amt )*100 ), "(9)")#% na
Totals #listfirst( lsnumberformat( qtyTotal ), "." )# #listfirst( lsnumberformat( lyQtyTotal ), "." )# #lsnumberformat( round( lyChange/val( lyQtyTotal )*100 ), "(9)")#% na #rereplace( lscurrencyFormat( amtTotal ), "\.\d*", "")# #rereplace( lscurrencyFormat( lyAmtTotal ), "\.\d*", "" )# #lsnumberformat( round( lyChange/val( lyAmtTotal )*100 ), "(9)")#% na