7 Replies Latest reply: Apr 10, 2018 5:41 PM by Petter Skjolden RSS

    Nested set analysis

    Stephen Parker

      Hi everyone,

       

      I am trying to get set analysis working in the following scenario:

       

      Given the following data set, I need to create a line chart that shows the count of stores that went over 20 in sales per day

       

      StoreDateSales
      A4/1/201810
      B4/2/201819
      A4/2/201812
      C4/1/20189
      A4/3/201824
      B4/3/201821

       

      So from the above data, I would expect the line chart to show 1 store on the 1st, 0 stores on the 2nd, and 2 stores on the 3rd. However, every equation I have used thus far shows 3 stores every day. Here is the equation I have been working with thus far

       

      count({<store = {"=Aggr(sum(sales), store, date)>=20"}>} distinct store)

       

      While I can't say that the equation above is a good starting point, hopefully it somewhat reflects my intentions. Can anyone help me understand how to get this line chart working properly with a proper equation?

       

      thanks,

      Stephen