Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pricing Model

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

BookingWeightServicePackage Type
15ExpressBox
210EconomyParcel
350ExpressParcel

Table 2

SupplierWeight FromWeight ToServicePackage TypeCost
Supplier A010ExpressBox£5
Supplier B050ExpressBox£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

13 Replies
Not applicable
Author

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

swuehl
MVP
MVP

If you still have issues, then please upload your new rates excel sample file with the modifications on the ranges you've made.

Not applicable
Author

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.

swuehl
MVP
MVP

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.