Calculating number of weeks since product release

SuperMike

New Member
Joined
Oct 1, 2013
Messages
3
Hello everybody!

I've imported two tables in power pivot.

One showing a product list and relative info such as product release date, units etc

The other one showing product sales per date.


The question is, how can i get to count the week number each sale was made since product release (with release date starting week 1)? Either by adding an extra calculating column or in an extra pivot table calculation. Either would help.

Thanks in advance.

Mike
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Exactly how you do it will depend on how you want to use it as there are different things that can be done with calculated columns measures.

If you wanted to simply assign each sale an 'age' then a calculated column in the table with the sales by date is probably the way to go. Working on the basis that your tables are called 'Product' and 'Sales' respectively and that the two are related by a common field called 'Product' you could go for something like:

Code:
=ROUNDUP(('Sales'[Date] - RELATED('Product'[ReleaseDate]) / 7 ),0)

The fundamental here is the RELATED which pulls the release date from the product table and subtracts it from the sale date to give a number of days since launch. It then divides by 7 to give weeks and the ROUNDDOWN should give round numbers in the way specified.

Jacob
 
Upvote 0
Jacob, this was more than helpful!

The only small modification i made is to add a '+1' after the division by 7 so as to count first week as 1 and not 0.

Thank you very much for your help!!
 
Upvote 0

Forum statistics

Threads
1,223,958
Messages
6,175,636
Members
452,662
Latest member
Aman1997

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top