Kimball Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Stores With Zero Sales

2 posters

Go down

Stores With Zero Sales Empty Stores With Zero Sales

Post  Bari Tue Jun 28, 2011 12:19 pm

hello,

Item table:

Item_key
item_desc
brand_code
category _code
category_desc
item_number
vendor_key
--------------------------------------------
Date

date_key
cal_date
month name
month_short_name
cal_month
cal_year
cal_quater
days_- in_the _year

-----------------------------
F_sales

sales_key
customer_key




----------------------------------------------------------------------------------------------------------------------------
I have list report with following Category Sku Description Supplier Sales volume Sales Value %Margin SR Margin Stock on hand Stock on order Number of Stores with zero stock
Stores DC's




As you see my last column is stores with zero sales,how can i show this value.Please help.Thanks
Modify message

Bari

Posts : 2
Join date : 2011-05-12

Back to top Go down

Stores With Zero Sales Empty Re: Stores With Zero Sales

Post  ngalemmo Tue Jun 28, 2011 12:45 pm

If any store can sell any item, all you need is to do an outer join from the item dimension (all items, any facts).

If each store carries different items then you need an additional table that provides the store/item relationship. You then outer join to the facts via item through this table.

But the sample query you gave has to do with zero stock, not zero sales, which you would deal with differently. Inventory is usually stored as an accumulating snapshot fact, where there would be a row for that item in that store with a zero quanity on hand value. No need to do an outer join.
ngalemmo
ngalemmo

Posts : 3000
Join date : 2009-05-15
Location : Los Angeles

http://aginity.com

Back to top Go down

Back to top

- Similar topics

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