1 Reply Latest reply on Sep 19, 2012 12:49 PM by Tracy Rodgers

    Using a created character attribute to partition data

    Xiaotong Zhang

      Before I created the attribute of BinNumber I sort the data by score in descending order and created two other attributes. One is CumCount (cumulative count) and TotalInEachBin (equal number of records in each bin). First of all, after I created BinNumber, it still stays in the Measures section, instead of the Dimension section though it is a character. But when I use BinNumber to partition data in a crosstab, it won't work and it only show 20 in the crosstab. I try to partition the data by 01 to 20 groups by using BinNumber. Can anyone help me to make it work? Thanks.

      BinNumber

      if [CumCount]<=[TotalinEachBin] then "01"

      elseif [CumCount]<=[TotalinEachBin]*2 then "02"

      elseif [CumCount]<=[TotalinEachBin]*3 then "03"

      elseif [CumCount]<=[TotalinEachBin]*4 then "04"

      elseif [CumCount]<=[TotalinEachBin]*5 then "05"

      elseif [CumCount]<=[TotalinEachBin]*6 then "06"

      elseif [CumCount]<=[TotalinEachBin]*7 then "07"

      elseif [CumCount]<=[TotalinEachBin]*8 then "08"

      elseif [CumCount]<=[TotalinEachBin]*9 then "09"

      elseif [CumCount]<=[TotalinEachBin]*10 then "10"

      elseif [CumCount]<=[TotalinEachBin]*11 then "11"

      elseif [CumCount]<=[TotalinEachBin]*12 then "12"

      elseif [CumCount]<=[TotalinEachBin]*13 then "13"

      elseif [CumCount]<=[TotalinEachBin]*14 then "14"

      elseif [CumCount]<=[TotalinEachBin]*15 then "15"

      elseif [CumCount]<=[TotalinEachBin]*16 then "16"

      elseif [CumCount]<=[TotalinEachBin]*17 then "17"

      elseif [CumCount]<=[TotalinEachBin]*18 then "18"

      elseif [CumCount]<=[TotalinEachBin]*19 then "19"

      else "20"  end