0 Replies Latest reply: Aug 15, 2013 7:07 PM by Shannon Spangler RSS

    Set analysis in Straight Table

      Hi,

       

      I am trying to pull a value into a straight table based on certain criteria.  In the expression tab, I have the following statement:

       

      =

      Sum({<Metric_Num = {"=MetricFlag = Metric_Num"}> * <Start_Size = {"=$(Size) >= [Start_Size]"}>*<End_Size = {"=$(Size) <= [End_Size]"}>}[Percentile - 25th])

       

      The values are coming from three separate tables.

       

       

      Table A:

      Profit Center #

      Size_Num

      Month

      Year

       

      Table B:

      MetricID

      MetricName

       

      Table C:

      Metric_Num

      Start_Size

      End_Size

      Percentile-25th

       

      I am using some variables in the set analysis:

       

      MetricFlag: = MetricID that the user selected

      Size: Avg(SizeNum)

       

      The above statement is supposed to pull the value from the Percentile-25th column (in table C) where:

       

      Metric_Num = MetricID

       

      AND

       

      Size >= Start_Size

       

      And

       

      Size <= End_Size

       

       

      When I select one profit center only, I get the correct result.  When I don't have a specific profit center selected, all of the lines in the straight table show the same value in this field.  How do I get the straight table to look at the profit centers separately when computing this field?

       

      Thank You!