Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to calculate percentage of total sales per customer/total sales for dates which are selected.
Am using the formula
(sum({$<DateKey={">=$(=Date(vFromDate,'YYYYMMDD'))<=$(=Date(vToDate,'YYYYMMDD'))"}, Year=, Quarter=, Month=, WeekName=, Date=, CustomerCode>} $(eSales))
-sum({$<DateKey={">=$(=Date(vFromDate,'YYYYMMDD'))<=$(=Date(vToDate,'YYYYMMDD'))"}, Year=, Quarter=, Month=, WeekName=, Date=, CustomerCode>} $(eRent)))
/
sum({$<DateKey={">=$(=Date(vFromDate,'YYYYMMDD'))<=$(=Date(vToDate,'YYYYMMDD'))"}, Year=, Quarter=, Month=, WeekName=, Date=>} $(eSales))
-sum({$<DateKey={">=$(=Date(vFromDate,'YYYYMMDD'))<=$(=Date(vToDate,'YYYYMMDD'))"}, Year=, Quarter=, Month=, WeekName=, Date=>} $(eRent))
But the result is 100%.
Thanks,
Remya
Try this
(sum({$<DateKey={">=$(=Date(vFromDate,'YYYYMMDD'))<=$(=Date(vToDate,'YYYYMMDD'))"}, Year=, Quarter=, Month=, WeekName=, Date=, CustomerCode>} $(eSales))
-sum({$<DateKey={">=$(=Date(vFromDate,'YYYYMMDD'))<=$(=Date(vToDate,'YYYYMMDD'))"}, Year=, Quarter=, Month=, WeekName=, Date=, CustomerCode>} $(eRent)))
/
(sum(TOTAL {$<DateKey={">=$(=Date(vFromDate,'YYYYMMDD'))<=$(=Date(vToDate,'YYYYMMDD'))"}, Year=, Quarter=, Month=, WeekName=, Date=>} $(eSales))
-sum(TOTAL {$<DateKey={">=$(=Date(vFromDate,'YYYYMMDD'))<=$(=Date(vToDate,'YYYYMMDD'))"}, Year=, Quarter=, Month=, WeekName=, Date=>} $(eRent)))
Try this
(sum({$<DateKey={">=$(=Date(vFromDate,'YYYYMMDD'))<=$(=Date(vToDate,'YYYYMMDD'))"}, Year=, Quarter=, Month=, WeekName=, Date=, CustomerCode>} $(eSales))
-sum({$<DateKey={">=$(=Date(vFromDate,'YYYYMMDD'))<=$(=Date(vToDate,'YYYYMMDD'))"}, Year=, Quarter=, Month=, WeekName=, Date=, CustomerCode>} $(eRent)))
/
(sum(TOTAL {$<DateKey={">=$(=Date(vFromDate,'YYYYMMDD'))<=$(=Date(vToDate,'YYYYMMDD'))"}, Year=, Quarter=, Month=, WeekName=, Date=>} $(eSales))
-sum(TOTAL {$<DateKey={">=$(=Date(vFromDate,'YYYYMMDD'))<=$(=Date(vToDate,'YYYYMMDD'))"}, Year=, Quarter=, Month=, WeekName=, Date=>} $(eRent)))
Thanks