3 Replies Latest reply: Nov 18, 2016 10:34 AM by George Barrett RSS

    Set Analysis: Set dimension values equal to another field value

    George Barrett

      Hello,

       

      I am working with a table that contains event ticket data and need help with some set analysis. The goal is to create a line chart that has 1 dimension and 2 measures that compares ticket sales over the course of time for an event (event_id) and its predecessor (py_event_id).  A selection of the event_id must be made for the chart to work. Since the two sale periods could be differing lengths, I have set the dimension to be the percentage of time in the sale period. The syntax is this: NUM(((sale_date-cy_first_sale_date))/(cy_days_in_sale_period), '#,##0.00%'). cy stands for current year. The measure is Sum(tickets). This works in the line chart. I tried creating the second measure with set analysis like this: Sum({$<event=p(event_id)tickets). However, this just returns the same result as the first measure. I am guessing that the set analysis is not affecting the values in the dimension calculation. Does anyone have any insight on how I can make this work? Thank you in advance.