9 Replies Latest reply: Dec 21, 2016 6:48 AM by Vineeth Pujari

# (WeekSales)/ Monthly Sales

Hello All,

Need a help on computing (Week Sales)/ Month Sales of current year, in order to achieve Week's contribution in monthly sale.  I have  already created weeks, month in my calendar.

Any suggestions.

• ###### Re: (WeekSales)/ Monthly Sales

What is your chart dimension or is this in a text box object?

• ###### Re: (WeekSales)/ Monthly Sales

Dimension has sales executive.

• ###### Re: (WeekSales)/ Monthly Sales

sum( {< Year = {'\$(=Year(Today())'} , Week = {'\$(=Week(today())'}  > } Sales)

/

sum( {< Year = {'\$(=Year(Today())'} , Month = {'\$(=Month(today())'}  > } Sales)

• ###### Re: (WeekSales)/ Monthly Sales

Hi

I have created customise weeks where day 1-7 is Week1.

8-15 Week2

15-21 Week3

Beyond 21 all is in week4.

• ###### Re: (WeekSales)/ Monthly Sales

i believe you have used week calculation as,  ceil(day(DATE)/7)  in your script; use the same calculation as what you have in the script in the set expression

example

sum( {< Year = {'\$(=Year(Today())'} , Week = {'\$(=ceil(day(today())/7) '}  > } Sales)

/

sum( {< Year = {'\$(=Year(Today())'} , Month = {'\$(=Month(today())'}  > } Sales)

• ###### Re: (WeekSales)/ Monthly Sales

I am using this with my calendar(In script) for creating weeks.

IF(num(Left(D,2))<=7,'W1',

IF(num(Left(D,2))>=8 And num(Left(D,2))<=14,'W2',

IF(num(Left(D,2))>=15 And num(Left(D,2))<=21,'W3',

IF(num(Left(D,2))>=21 ,'W4'))))  As  'Week'

• ###### Re: (WeekSales)/ Monthly Sales

what is the format of the field "D"?

• ###### Re: (WeekSales)/ Monthly Sales

D is date having format DD-MM-YYYY

• ###### Re: (WeekSales)/ Monthly Sales

create a variable as below, and use this in your expression

vWeekIN =  'W' & if(day(Today())>21,4,ceil(day(today())/7))

Expression

sum( {< Year = {'\$(=Year(Today())'} , Week = {'\$(=vWeekIN')}  > } Sales)

/

sum( {< Year = {'\$(=Year(Today())'} , Month = {'\$(=Month(today())'}  > } Sales)