2 Replies Latest reply: Aug 6, 2012 2:12 AM by Some Nath Roy

Count stores with sales in previous year

Hi,

I need to count the number of stores that had sales the previous year as well as for the current year then compare the two.

The expression should also disregard any selections made for 'Year' & 'Month'

I use the following to count the stores across all period, what do I need to change for it to only consider the previous year?

=count({\$<[Sales]={">0"} >} distinct [Store Name])

'Sales' is the field name that holds the sales value

• Re: Count stores with sales in previous year

try to  use Max(year), and max(year)-1 for current year and previous year respectively...

Hope it Helps!!!

• Re: Count stores with sales in previous year

Hi,

For Current year :

Count( {< sales = {'>0'}, year = {'\$(=Max(year))'}, month = {'\$(=Max(month))'}, year, month >} stores )

For Previous year:

Count( {< sales = {'>0'}, year = {'\$(=Max(year) - 1)'}, month = {'\$(=Max(month))'}, year, month >} stores )

Regards,

Som