1 Reply Latest reply on Jul 19, 2018 3:04 PM by Aaron Sheldon

    Please Pros: Split Dimension Into Sets/Groups Based on Event Velocity Using Date.

    James D

      Hi, maybe someone knows an elegant solution to this.

       

      My data is as follows, but with hundreds of distinct items, not just A,B,C:

       

      ItemEvent Date
      A1/1/18
      A1/2/18
      A1/3/18
      B1/1/18
      B1/3/18
      B1/5/18
      B1/7/18
      B1/9/18
      C1/1/18
      C1/2/18
      C1/3/18

       

      I want to create a bar chart with a dimension or set that will group Items based on their aggregate event velocity. Items that have 1 event everyday (like A and C above) would go into "velocity group 1," and items with 1 event every 2 days (like B above) would go into "velocity group 2." I would also have items that fall into a "velocity group 3" if they have 1 event every 3 days, and so on... With this, I would then create a bar chart with the desired dimension or set in the columns shelf, and a distinct number of items in the rows shelf, to see how many Items are in each velocity group. I'm not trying to create a table where the groupings depend on having all Item values on in the viz.

        • 1. Re: Please Pros: Split Dimension Into Sets/Groups Based on Event Velocity Using Date.
          Aaron Sheldon

          You are asking for the average event period for each item, which is the duration between the first and last event divided by the number of events. We can accomplish this through the ratio of three level of detail calculations.

           

          [PERIOD] := ({ FIXED [ITEM] : MAX([EVENT]) } - { FIXED [ ITEM] : MIN([EVENT]) }) / { FIXED [ITEM] : SUM([Number of Records]) }

           

          This will create a decimal valued field, which is not quite what you want. As a last step, create a bins field from this calculated field to give you the flexibility to classify the velocity groups. When plotting the histogram take care to pay attention to the aggregate marks setting as different choices of this setting can end up multiplying by the total events, instead of strictly counting items.