2 Replies Latest reply on Jun 5, 2013 12:13 PM by Sam Bruce

    Using max(dimension) as condition in calculation

    Sam Bruce

      I have a table that displays Sales and Units for a period of time and need to add in an Inventory measure.  Of course, inventory is not calculated across a period of time but only at the latest date recorded.

       

      I was planning to create the measure:

           Max_Period = max(Period_ID)

      then a calculated field of:

           IF Period_ID = Max_Period THEN End_Inv END

       

      However I get an error, Cannot mix aggregate and non-aggregate measures.  I could use a parameter but this would require user interaction and I need it to be automated.

       

      Thoughts?

      Sam