4 Replies Latest reply: May 23, 2018 8:48 AM by Sunny Talwar RSS

    exclude the outlier in histogram

    celine xu

      Hi,

      wondering I create a histogram. the average price is around 20-100 but have one outlier (bad datapoint) about 4000

      is that any easy way (only use dashboard) to exclude it  then can make the histogram more pretty (in right scare)

       

      Any suggesting methord to solve this without change underline data (loading data)


      Thank you!Screen Shot 2018-05-23 at 13.03.19.png

        • Re: exclude the outlier in histogram
          celine xu

          I try to use

          =if(prise<(max(prise)-1),prise)

           

          in the data selection field but does not work. any suggestion? Thank you!

          • Re: exclude the outlier in histogram
            Sunny Talwar

            Since, this is a histogram, you won't be able to perform any calculation in the this particular chart. You have two options

             

            1) Create a bar chart with your own buckets

             

            2) Modify the script to create a new price field which already exclude the outliers. something like this

             

            Table:

            LOAD ...,

                 price

            FROM ....;

             

            Left Join (Table)

            LOAD Stdev(price) as StdevPrice,

                 Avg(price) as AvgPrice

            Resident Table;

             

            FinalTable:

            LOAD *,

                 If(price > AvgPrice - 3*StdevPrice and price < AvgPrice + 3*StdevPrice, price) as new_price

            Resident Table;

             

            DROP Table Table;