Sales Order Refund

View previous topic View next topic Go down

Sales Order Refund

Post  SiSponge on Tue Apr 01, 2014 3:32 pm

Hi,

Could anyone advise on how one normally handles refunds to sales orders in a dimension model on sales. Would it be more common to have a refund as a row in the the sales order fact table as a special type of sales order (maybe part of a junk dimension) or is it more common to have a separate fact table for refunds.

The type of questions likely to be asked by the business are how much has sales income has x campaign generated by geographical region where campaign and geographical regions are a couple of the dimensions. To give a true picture of income refunds need to be incorporated into the reporting


SiSponge

Posts : 2
Join date : 2014-04-01

View user profile

Back to top Go down

Re: Sales Order Refund

Post  Booma on Wed Apr 02, 2014 6:42 am

What I would do (I'm fairly new to dimensional modeling too) is store the sales/returns in the same fact table. You probably have some kind of total_price per order. For a refund, just do the price * -1, so you get the negative.
So if you sell one product, and it gets returned, you will have two rows in the fact table. When summing the total_price of both, you will have 0. Maybe add a flag indicating wether the order is a sale, or return.
avatar
Booma

Posts : 12
Join date : 2014-03-10

View user profile

Back to top Go down

Re: Sales Order Refund

Post  BoxesAndLines on Wed Apr 02, 2014 4:50 pm

A refund is just another order with negative quantities. Just like debits and credits, each transaction (order) must stand on its own.
avatar
BoxesAndLines

Posts : 1212
Join date : 2009-02-03
Location : USA

View user profile

Back to top Go down

Re: Sales Order Refund

Post  SiSponge on Fri Apr 04, 2014 5:00 pm

Thanks for the replies, it's helped to confir. my thoughts in defining the grain of the table and that the refund belongs on the same table as the initial order ...as you say with a negative value. My gut is also tending towards making the type of translation (order or refund) part of a junk dimension. As I can envisage the question of how much and how many refunds were given

Cheers

SiSponge

Posts : 2
Join date : 2014-04-01

View user profile

Back to top Go down

Re: Sales Order Refund

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum