Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All - I'm trying to use the stdev() function but am struggling to apply it to meet our needs.
Here is a sample data that is similar to our data structure, we have a product, a week, and the total sales.
I'm trying to identify the standard deviation of product sales across the all weeks excluding the current week for each product, lets assume current week is week 5.
Using the following formula in my straight table: stdev({<Week<={3}>}Sales), I can only get the stdev of all sales for that specific week range.
Can anyone help me figure out how to return the standard deviation across weeks for each product? Thanks so much!
Product | Week | Sales |
Product 1 | Week 1 | 1000 |
Product 2 | Week 1 | 2000 |
Product 3 | Week 1 | 3000 |
Product 1 | Week 2 | 1400 |
Product 2 | Week 2 | 2001 |
Product 3 | Week 2 | 4920 |
Product 1 | Week 3 | 1892 |
Product 2 | Week 3 | 3892 |
Product 3 | Week 3 | 2378 |
Product 1 | Week 4 | 9772 |
Product 2 | Week 4 | 781 |
Product 3 | Week 4 | 3922 |
Product 1 | Week 5 | 3888 |
Product 2 | Week 5 | 3789 |
Product 3 | Week 5 | 1999 |
Try using the Aggr function - you may not have the week in your table, then you get the Standard Deviation per product.
=Aggr({<WEEK={"<=3"}>}
StDev({<WEEK={"<=3"}>}SALES),
PRODUCT
)
Try using the Aggr function - you may not have the week in your table, then you get the Standard Deviation per product.
=Aggr({<WEEK={"<=3"}>}
StDev({<WEEK={"<=3"}>}SALES),
PRODUCT
)