3 Replies Latest reply on Apr 1, 2013 4:34 PM by Dan Huff

    Case statement with aggregate and disaggregate

    Chris Sommers

      Hi all,



      I've created a parameter "Metric Desired" which is a list of the metrics in my data.


      I have one calculated field for "Average Selling Price" = sum(Revenue)/sum(Quantity)


      I've created a calculated field called "Values" where it determines what metric to display based on what the user selected in "Metrics Desired" parameter.  This is the Measure that I am using.



      How do I create a case statement similar to:


      CASE [Metric Desired] When "Quantity" Then ([Quantity])

                    When "Revenue" Then ([Revenue])

                    When "ASP" Then [ASP] 




      that accommodates "ASP" being an aggregate measure.



      Thanks for your assistance,