Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear community,
I have a table of orders which contain information on weight, service and package type.
I want to join these to a rate table that has the service, package type and a upper and lower weight limit. Is there a way I can do a join that matches the service and package type then picks up the correct weight bracket if the weight is greater than the min and less than the max?
Example Below:
Table 1
Booking | Weight | Service | Package Type |
---|---|---|---|
1 | 5 | Express | Box |
2 | 10 | Economy | Parcel |
3 | 50 | Express | Parcel |
Table 2
Supplier | Weight From | Weight To | Service | Package Type | Cost |
---|---|---|---|---|---|
Supplier A | 0 | 10 | Express | Box | £5 |
Supplier B | 0 | 50 | Express | Box | £10 |
What I want to do is add a column for each supplier so Table 1 would have the price for supplier A on line 1 as £5 and a column for supplier 2 for line 1 of £10
Many thanks - Drew
That is correct. In most cased there is only one "range" as such but I have to have this in place for all suppliers in case they change their model.
I made the change to the range so that it doesn't overlap and I get multiple joins on the table.....
I've seen a post about slowly changing dimensions but I can't see anything that references multiple other fields that need to match
If you still have issues, then please upload your new rates excel sample file with the modifications on the ranges you've made.
Hi Swuehl
Attached is both the new rate sheet and my QVW - the weights are linking on the level and type but not the weight range ( as you can see In the script I wasn't sure if it was a formatting thing so tried changing that)
Thanks for your help on this.
I've added a QuoteID and also a JOIN to the Intervalmatch to get the data model a bit more slim.
Looks quite ok to me.