Visokio website     Downloads     Video tutorials     KnowledgeBase  
Merge/Join: Merging files based on ranges? - Visokio Forums
Merge/Join: Merging files based on ranges?
  • briansj May 22, 2013 2:02PM
    I would like to merge to files to create a file that matches up values based on the ranges provided in the second file. I suppose there is a reasonably simple way to do this, but I can't find it. See the example below.

    Thanks
    Brian

    File 1
    Field 1
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12

    File 2
    Min | Max | Value
    1 | 4 | A
    5 | 8 | B
    9 | 12 | C

    Merged file
    Field 1 | Field 2
    1 | A
    2 | A
    3 | A
    4 | A
    5 | B
    6 | B
    7 | B
    8 | B
    9 | C
    10 | C
    11 | C
    12 | C
  • 6 Comments
  •     paola May 23, 2013 10:48AM
    image

    You can do merge on 2 fields, in the DataManager, making sure the value in [Field1] is at the same time greater/equal and smaller/equal than [Min] and [Max] in the second file.
    Attachments
    MinMax.JPG 86K
  • briansj May 23, 2013 11:27AM
    I upgraded to 2.8 and I see it now.

    Thanks
  •     paola May 23, 2013 11:58AM
    Another way to do 'bucketing' would be to use an IF statement

    IF(
    [Field1]<5, "A",
    [Field1]<9, "B",
    [Field1]<13, "C",
    "other")
  • briansj May 23, 2013 4:59PM
    I took another look at the example you sent and it looks like this is not doing what I expected - in your output, the value is only picking up the breakpoints and not all the values. Is there a way to have the first "Value" field in your example pick up all the valuesfrom the first data file? If not, I will look to use an IF statement

    thanks
  •     chris June 4, 2013 6:56AM
    Hi,

    There was a bug in the merge/join operation that has now been fixed. Please update to the latest version of Omniscope 2.8 (b952). Please note that you may need to clear your cache (DataManager tools > Clear disk cache).
  •     paola June 4, 2013 7:25AM
    image

    Updated image of the merge - as it should be.
    Attachments
    Bucket merge.JPG 145K

Welcome!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership