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: 
raju_salmon
Creator II
Creator II

Unit price difference between orderdetails and Product table

Dear Team,

I am new to database and understanding it, though it is very basic question can anyone please let me know the dirrerence between unit price in order_details table and Product table.

I have productID and UnitPrice in both tables so synthetic key is forming. If i rename it, which unit price i need to consider for sales calculation.

Thank you.

Regards,

Raju

1 Solution

Accepted Solutions
MayilVahanan

Hi Raju,

I think,

Product Table: Original price of the product is available.

Order Table: Contains the price of the product is sold. It may be contains some discount, adjustment, co-pay or tax.

Based on the order table, we can able to find the sales of the product / company.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

13 Replies
sunny_talwar

Does each ProductID has a unique and equivalent UnitPrice in both the tables? If it is always unique and remains same, then it doesn't matter which one you use.

MayilVahanan

HI

As per my understanding, Price from product table should be refer in "Order" table for calculation.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
raju_salmon
Creator II
Creator II
Author

No Sunny, It is not unique. Can you please referUnit Price.jpg the attachment.

MayilVahanan

Hi

For Sales calculation, You can refer the "Unit Price" in Order Details.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
raju_salmon
Creator II
Creator II
Author

Thanks for your reply. May i know what is the difference between both? The unit price in order table is lower/higher than unit price in product table.

MayilVahanan

Hi Raju,

I think,

Product Table: Original price of the product is available.

Order Table: Contains the price of the product is sold. It may be contains some discount, adjustment, co-pay or tax.

Based on the order table, we can able to find the sales of the product / company.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
qlikviewwizard
Master II
Master II

Hi Raju Salmon, Please close the thread by selecting Correct Answer. Thank you.

raju_salmon
Creator II
Creator II
Author

Hi,

Can you please provide me correct answer. I have received only helpful answer.

Regards,

Raju

qlikviewwizard
Master II
Master II

Hi Raju, Please attach the sample data to demonstrate your issue. It will help us in better understand.Thank you.