Find matching range in another dataset

yankees9920
yankees9920 Registered Posts: 2

I have a dataset of properties and their prices

Address Price
123 Main St450,000
1 Broadway750,000

and another dataset that contains scores based on where the price falls within the range

LowRangeHighRangeScore
0499,99910
500,0001,000,0005

I'm looking to append a row to the first table that does a lookup to see what the score should be and would expect the following output.

AddressPriceScore
123 Main St450,00010
1 Broadway750,0005

I can't join these tables since they have no IDs in common and I haven't figured out a way to reference another dataset in a formula during the Prepare step. Any help would be appreciated!

Tagged:

Best Answer

  • Alexandru
    Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,226 Dataiker
    Answer ✓

    Hi @yankees9920
    ,

    You should still be able to use a Join recipe in this case but with multiple join conditions with <= and >=
    Screenshot 2023-03-13 at 12.08.03.png

    Let me know if that works for you!

    In my example LowRange is min and HighRange is max. Output was :
    Screenshot 2023-03-13 at 12.05.58.png

Answers

  • yankees9920
    yankees9920 Registered Posts: 2

    Thank you very much, not sure how I missed that.

    I have multiple scoring ranges/criteria that I use and I just discovered that I could use pre-joined computed column to further filter each join by the appropriate type

Setup Info
    Tags
      Help me…