Generate new multiple attributes!!!

ShiwaaniShiwaani Member Posts: 7 Contributor II
There are 3 attributes namely ID LISTINGS CURRENTVALUE...I need to report for every record, LISTINGS which lies between 0.8 and 1.8 of the CURRENTVALUE.

I would hope to generate a new attribute to hold each LISTING whose value lies in the following range(0.8 to 1.8 of the CurrentValue).

Thx

Answers

  • earmijoearmijo Member Posts: 270 Unicorn
    Use the operator "Generate Attributes" and define the new variable FLAG:

    flag    = if(listing>0.8*currentvalue && listing<1.8*currentvalue,1,0)
  • ShiwaaniShiwaani Member Posts: 7 Contributor II
    Thank you for the reply,but I require the system to loop through the CurrentValue (for each record) and provide me with an array of Listings.

    -Shiwaani
  • earmijoearmijo Member Posts: 270 Unicorn
    Then it would help if you uploaded a simple example illustrating what you want. It doesn't have to be the dataset you are using (if there are issues of confidentiality).
  • ShiwaaniShiwaani Member Posts: 7 Contributor II

    Dataset
    ID Listing Current Value
    11A ABC     600
    12A DEF     400
    13A GHI     800
    14A JKL     200
    15A MNO 1200


                          Range
    .8*CurrentValue 1.8*CurrentValue
    480                         1080
    320                         720
    640                         1440
    160                         360
    960                         2160


    Desired output
    ID     Listing       Current Value NewVar1     NewVar2 NewVar3
    11A  ABC         600                ABC             GHI
    12A   DEF         400                   DEF            ABC
    13A   GHI         800                   GHI           MNO
    14A    JKL             200                 JKL
    15A  MNO       1200               MNO

Sign In or Register to comment.