1 Reply Latest reply on May 10, 2017 7:30 AM by Anna Cheetham

    Inconsistent Data Variables for a Calculation

    Alexander Elfering

      Good morning,

       

      I am trying to calculate the total number of flights from American Airlines, and divide it by the total number of flights operated by American, United, Delta, British Airways, and Lufthansa. The issue that I am having is that the data variables are all mixed up and inconsistent with one another. I attached the workbook below. Is there a workaround for this, or is it a data governance issue?

       

      Thanks,

      Alex Elfering

        • 1. Re: Inconsistent Data Variables for a Calculation
          Anna Cheetham

          I'm not completely sure what your problem is.  Is it the varying forms of "American Airlines" that are the problem?

           

          If so, then you could create a calculated field, like this:

           

          Airline Corrected

           

          IF LEFT([Airline],4) = 'Amer' THEN 'American Airlines'

          ELSE [Airline]

          END

           

           

           

          Of course, if you ever get a new value in your data that doesn't have "Amer" at the beginning, it won't work, but hopefully that's relatively unlikely?

           

           

          Alternatively, you could create a group and group those different values together as American Airlines, but that's even more vulnerable to new and different values coming into your data with a refresh.

           

           

          Regards

           

          Anna