Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
shwetagupta
Partner - Creator II
Partner - Creator II

(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.

9 Replies
sunny_talwar

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

vinieme12
Champion III
Champion III

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

/

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

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
shwetagupta
Partner - Creator II
Partner - Creator II
Author

Dimension has sales executive.

shwetagupta
Partner - Creator II
Partner - Creator II
Author

Hi

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

8-15 Week2

15-21 Week3

Beyond 21 all is in week4.

vinieme12
Champion III
Champion III

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)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
shwetagupta
Partner - Creator II
Partner - Creator II
Author

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'

vinieme12
Champion III
Champion III

what is the format of the field "D"?

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
shwetagupta
Partner - Creator II
Partner - Creator II
Author

D is date having format DD-MM-YYYY

vinieme12
Champion III
Champion III

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)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.