Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Check if invoiced prices matches price from Contract

Hi all

I am currently developing a Qlikview Based Purchase Analyzing Tool. One of the Tasks I have been given is to check if suppliers complies with the prices in the contract. 1-2 times a year in a 4 year contract period the suppliers have the right to regulate prices based on USD, index, etc. This gives me some challenges. A possible maximum of 8 pricelists.

A first simple overview of the thoughts I have done so far.

Pricelist (Table):

ContractIDSupplierIDItemIDStartdateEnddatePrice_pr_UOMUOM
100012000000DC-100001-01-201430-06-20141000EA
100012000000DC-100001-07-201431-12-20141250EA
100012000000DC-100001-01-201530-06-20151300EA
100012000000AC-250001-01-201231-12-20162500EA

Invoice_Lines (Table):

InvoiceIDInvoice_DateSupplierIDItemIDInvoicedQTYInvoicedAMT
100023-05-201412000000DC-100021050
110015-07-201412000000DC-100011250
120030-11-201312000000DC-100011750
130015-04-201312000000AC-250012600

I hope to be able to calculate the following:

  1. total turnover on a contract (pr. item, pr. contract, pr. supplier)
  2. overbilling pr. item, pr. supplier, pr. contract
  3. total turnover outside of contract

with regards to different prices within the contract period.

My first thought would be to check during the load of invoice lines if the items bought is covered by an contract and a specific pricelist and enrich the Invoice_Lines (Table) with this information.

I will happily supply this thread with more information if needed.

Thank you

Anders

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Check out Intervalmatch and Intervalmatch(Extended) from QlikView Help.

You can join that table without multiplying it with the above method. Then you can do everything.

PS1: Well it multiplies it but in an efficient way.

BR

Serhan

View solution in original post

8 Replies
Not applicable
Author

We expect around 4-10 million records in the Pricelist (Table) and around 2-4 million new records in Invoice_Lines (Table) pr. year.

Anonymous
Not applicable
Author

Hi Anders,

You certainly have yourself an interesting problem there. I know that dealing with things like exchange rate variations is possible as we do that within Qlik but I am not certain of how it is handled. I believe this is an example of a slowly changing dimension. You might find some useful info in the following blog post.

http://community.qlik.com/blogs/qlikviewdesignblog/2013/06/03/slowly-changing-dimensions

Not applicable
Author

Hi Adam

This is an really interesting input. Slowly Moving Dimensions.

I have read the blog now and try to use the principles on some sample data in the weekend and get back early next week.

Kind regards

Anders

Anonymous
Not applicable
Author

Check out Intervalmatch and Intervalmatch(Extended) from QlikView Help.

You can join that table without multiplying it with the above method. Then you can do everything.

PS1: Well it multiplies it but in an efficient way.

BR

Serhan

Not applicable
Author

Hi Serhan

I have attached my first test with the IntervalMatch.

It does almost what I want to achieve in very few steps, however every transaction not on a contract is discarded.

As I am a Qlikview novice, it is probably a newbie mistake.

Any suggestions?

Kind regards

Anders

Not applicable
Author

I think I solved the problem above with a Left Join instead of inner join.

However Ending up with just one table dropping the Contracts and Bridging table might be a good idea as I have done in the attached document.

Bu this solution will of course change the no. of records in my transactions table, which doesnt seem like a good idea.

Another problem is that even though some Procurement specialists have told me that one itemID can only have one Price on a specific date, it only took 5 minutes to find an item present in different contracts with different prices. So I probably end up with having to deal with a Many-To-Many relationsship or simply only accept one record for an item in the Contracts on any date.

I just dont know how to make that check during dataload.

Anonymous
Not applicable
Author

Hi Anders,

I can only write a quick note.

You dont have to inner join or left join. Just dont join and leave a synthetic key (a useful one for your case). That way you can keep 2 tables without cartesian.

BR

Serhan

Not applicable
Author

Thank you both for valid input to my challenges with Qlikview this time.

I solved my problem with the IntervalMatch and kept a synthetic key.

Kind regards

Anders