1 Reply Latest reply on Nov 3, 2016 8:41 AM by lenaic.ridinger

    Create inclusive bins on axis

    amulya.sharma

        Data:

      IDDays
      135
      270
      3150
      4200
      5240
      690
      7190

       

      For the ID's, how do I create a horizontal x-axis with bins of 30 days intervals each (0, 30, 60..etc.), while making the days inclusive in all the bins and NOT exclusive to the only bin their days occur in.

      Eg: ID 7 (Days=190) should be inclusive in all bins till 210. And not only in the 180-210 bin.
             ID 2 (Days=70) should be in 0-30 bin, 30-60 and 60-90 bins. etc.

        • 1. Re: Create inclusive bins on axis

          Hi amulya.sharma,

           

          Dimensions partition data rows so that each data row is associated with exactly one member of the dimension. So you can't use a single dimension to accomplish your goal. Adding more dimensions won't help since that will just partition the data at a finer level of granularity.

          So you need another approach that doesn't use dimensions for the Days field. What else can you use? The only other significant choice is to use measures. (Attributes are just another variant of measure in this regard)

           

          So make a calculated field Records_60_days_or_more defined as count(if Days >= 60 then 1 end) Make similar ones for Records_0_days_or_more, Records_90_days_or_more etc.

          You can make the new fields discrete or continuous depending on how you want to present them.

           

          I would consider renaming your "bins" something like 0+, 30+, 60+, since you really aren't using the upper bound at all -- like an accounts receivable aging report.

          Finally, if the field Days can be null, you should consider how you want to modify these calculations. The definitions above ignore any records with null Days. If instead you want to treat a null number of Days as either zero or infinity for these calculations, then you can make some adjustments using functions like ZN(), IFNULL() or ISNULL()