Slope is the rate in change in y values over change in x value. When you say you want to rank products based on slope do you imply there is one slope per product? If that's the case, you can use the difference between values of 1st week and 5th week. Since difference in x value is same for each product, you can compare or sort on this without making the division. If this is what you want you can write this using an LOD calculation as 1st value is the minimum for a given product for the time series and 5th is the maximum.
If you want a different sort for each week e.g. sort based on slope for 1-2 in a viz, 2-3 in a different viz, 3-4 in a different viz etc.you can do this using a table calculation, you need to look back (or forward) using LOOKUP function so you can compare current point with previous or next.
If you really want to fit a Nth degree polynomial and use the estimate the polynomial gives for each point to calculate these slopes (as opposed to the observed sales values) then you will need R integration.
If you can clarify, it would be make it easier for forum users to help.
On a relevant note, you can add multiple trendlines in the same view. Please try putting Product on color shelf.
Thanks for the answer. I think my solution will be to do something like you recommended first, and just look at the difference between the sales per week, and forget about the polynomials for now.