2 Replies Latest reply on Jul 9, 2018 3:13 PM by Zack douglas

    Creating a calculated field using two measurements?

    Zack douglas

      Hello,

       

      I am attempting to create a line graph comparison of deaths vs injuries in car accidents. I am trying to create a calculated field that shows the number of car accidents "killed vs injured" across the country. When a person is killed in an accident their status is "Killed" and it is simply their number of records. However when a person is injured I am trying to show the distinct count of accident codes for "Status = Injured" to get the correct value of number of injured casualties. Please see calculated field below.

       

      If [Status] = "Killed" then [Number of Records]

      Else if [Status] = "Injured" then [Countd[accident ID]

      End

       

      I am returned with an error that states cannot mix aggregate and non aggregate values. Any ideas for a work around?