Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Martin-DWH
Contributor II
Contributor II

Week to week difference using autocalendar

Hello everyone,

I want to calculate the Week-to-Week difference in Sales. My app uses the autocalendar, so I am able to see the week and the year, but I don´t know how to calculate the difference between current week and past week.

 

I´ve enclosed the script if you need reference.

 

Thanks for your help!

 

 

 

Labels (1)
1 Solution

Accepted Solutions
marcus_sommer

Take a look to interrecord-functions like above() to reference to calculations within any cell of your chart. Within a simple chart like yours it might be:

sum(Value) - above(sum(Value))

View solution in original post

4 Replies
anat
Master
Master

Can you try by calculating week number then apply[ week number minus previous( week number)

LucQod
Contributor
Contributor

U can use autocalendar field WeeksAgo :

Example :
Count({<[ReloadEnd.autoCalendar.WeeksAgo]={0}>}distinct [ReloadEnd])

Count({<[ReloadEnd.autoCalendar.WeeksAgo]={1}>}distinct [ReloadEnd])

 

ofc if u want calculate the difference between current week and past week.

marcus_sommer

Take a look to interrecord-functions like above() to reference to calculations within any cell of your chart. Within a simple chart like yours it might be:

sum(Value) - above(sum(Value))

Martin-DWH
Contributor II
Contributor II
Author

The above() function did the trick! Thanks!