My problem
I would like to know which product types have reached a certain sales volume threshold for the first time in the previous week (e.g., sports clothing items have not been sold in the past 13 weeks and last week have been sold at least 100 times).
What data do I have?
Weekly sales data over multiple product types for more than a year.
How do I try this at the moment?
I have now pivoted the week dimension, included the product type as normal dimension, and the sales volume is the measure I use. I’ve made a table calculation to check whether a product type has been sold for the first time (significantly) in the past week. To be certain it was not sold before I check for 13 weeks back and see if there is a signifiant sales volume in those weeks. The table calculation basically works as follows:
pivot_index(${datatable.salesvolume},14)-if(is_null(pivot_index(${datatable.salesvolume},13)),0,pivot_index(${datatable.salesvolume},13))>100 AND (pivot_index(${datatable.salesvolume},13)<5 OR is_null(pivot_index(${datatable.salesvolume},13))) AND (pivot_index(${datatable.salesvolume},12)<5 OR is_null(pivot_index(${datatable.salesvolume},12))) ... AND (pivot_index(${datatable.salesvolume},2)<5 OR is_null(pivot_index(${datatable.salesvolume},2))) AND (pivot_index(${datatable.salesvolume},1)<5 OR is_null(pivot_index(${datatable.salesvolume},1)))
I filter the data on the past 14 completed weeks. Accordingly, I only show the newly introduced product types in my visualisation by Hiding no’s from visualization.
The problem
As I have approx. 3000 product types, and look back 14 weeks in time, I’ve quite a massive table. When I schedule this table, the results are sent to the recipients before the Hiding no’s from visualization can do the trick, i.e., it’ll send the full table (also with the non-new product types) instead of only the newly created products.
Does anyone have an idea how to work around this precise issue? Thanks in advance for your help!