Count Index based on Multiple Conditions - Excel - excel

I have a table with order records for each Product Type. The columns contain information like Order Number, Customer Name, Product Category, Product, and Order Receipt Date.
My goal is to find the quantity of orders that fall into the below conditions:
New Customers Ordering any Product Category for the First Time
Existing Customers Ordering from any Product Category for the First Time
Reorders from any Product Category
What would be the best way to go about this?

Think I figured it out:
I created two columns for records: "First Product Type Order?" and "First Order?"
"First_Product_Type_Order": IF(AND(Order2=Order1,Product_Type2=Product_Type1),First_Product_Type_Order1,IF(SUMPRODUCT(($Customer$2:$Customer2=D2)*($Product_Type$2:$Product_Type2=Product_Type2))>1,"Reorder","First Time Order"))
"First_Order":
IF(Order2=Order1,First_Order1,IF(SUMPRODUCT(($Customer$2:$Customer2=Customer2)*1)>1,"Existing Customer","New Customer"))

Related

Showing Last Sold Date In a Netsuite ITEM Saved Search

I've created a search that shows current inventory on hand, their purchase price, and a formula that multiplies the two to have current value.
In the results field I want to have a column that shows the last time an item was on a sales order. but i am coming up short. Is there a way to do this?
Filter Criteria
Results Criteria
Criteria -
Inactive - FALS
Type - Inventory Item
Transaction Field: Type - Sales Order
Available - Is greater than 0
RESULTS -
Name - (Summary Type Group)
Description - (Summary Type Group)
Available - (Summary Type Count)
Transaction Fields - Date (Summary Type Maximum)
Did you create the saved search from the Item Record or Transaction Record?
If you created it from the Transaction Record then you will want to make sure to use the Date Field and Summary Type (Results tab) as Maximum.
Field = Date
Summary Type = Maximum
If you created the saved search from the Item Record you will need to use the Transaction Fields... table join to bring in the Transaction Date field.

Level of Detail on the primary data sources in tableau

I have one excel that contains the demand for each part by city:
e.g: the demand for part a for New york is 100 and 1+7=8 for Atlanta
I have another excel containing the inventory level for two warehouses: rural and urban:
e.g: Warehouse "Rural" stocks 50 for part a and warehouse "Urban" stocks zero for part c.
First I joined these two excels with the demand excel being the primary:
I googled about LOD (level of detail) in order to find out the inventory fulfillment for each warehouse by City
-- count the number of unique parts by each city for the demand:
calculated field [a] = { fixed [City]: countd([Part Number demand]) }
-- count the number of parts that are in stock (inventory level>0) by each warehouse:
calculated field [b] = { fixed [City],[Warehouse Location],[Part Number volume]: countd (if [Inventory Level] > 0 then [Part Number demand] end )}
-- calculate the inventory fulfillment %:
calculated field [c] = calculated field [a] / calculated [b]
and I got the following table and I think it is showing the correct fulfillment % by warehouse for each city: e.g: Warehouse "Rural" stocks 33% of unique parts needed by Atlanta.
Question 1: as I include more part numbers into the excel, I only want to consider the top 10 parts by volume needed for each city. I was trying to do the same thing with LOD to first find the total quantity needed per part per city:
{fixed [City], [Part Number demand]: sum([Part Number volume]) }
But it counts the quantity from both excels and I am just wondering if it is possible to only count the quantity from the primary excel (demand not the inventory),
Question 2: once I could count the total quantity needed, how do I transfer it into a filter so that I could only select top 10 parts by demand.
Apologize if these questions are dumb and appreciate for any advice!!

relationship filter in powerBI or powerpivot

i am using the powerBI tools (powerpivot) to create a data model. i am done the model. the model include the product, customer dimensions and sales fact table. i have made the relationship and hierarchy in the model. now i have a requirement to show the total revenue of all the customer who brought product 1,2,3.
for example customer A brought product 1 and product 5 and the total revenue from this customer is 50 so i want to show 50 as a result
customer B bought product 4 and i do not want to include this customer in my output.
i can do the same in microstratergy using relationship filter but how can i do the same in powerpivot or powerview or powerBI.
Please help
Thanks in Advance
In PowerPivot, relate Sales table with Customer table (Lookup table) and Relate Sales table to Product table (Lookup table).
Create following two measures
[HasPurchased X Products] =
OR (
OR (
CONTAINS ( Sales, Sales[ProductID], 1 ),
CONTAINS ( Sales, Sales[ProductID], 3 )
),
CONTAINS ( Sales, Sales[ProductID], 5 )
)
[DesiredMeasure] =
IF (
Sales[HasPurchased X Products] = TRUE (),
SUM ( [Amount] ),
BLANK ()
)
Select Customers in ROWS and add [DesiredMeasure] in VALUES, pivot table will show desired result.
Additionally to what Abhijeet said, which is a nice robust solution, you might also just filter the chart in Power View. Assuming you have a relationship between sales and products table, you can select the chart in Power View, open the Filters pane, select per chart filters, add Product to the chart filters and filter to include only productions 1,2,3. This will automatically calculate the measure. Now Abhijeet's solution is better if you need that calculation to be reused. This solution works great if you're in a 'what if' scenario where you'd like to say "what are the sales for products 1,2,3" and in another breath say "actually i'm interested in sales for products 2,3 only, so me that instead.".
HTH,
-Lukasz
http://dev.powerbi.com
http://blogs.msdn.com/powerbidev

How to normalize this table inventory

I have this excel sheet and I want to migrate it to Access (in the near future some other DB manager) And I don't know how to normalize it exactly, I know this might be very opinion base. Currently they use this table for inventory
This is the original Table (sheet)
"TableName: Parts", Fields:"Id_Part", "No_Part", "No_Mold", "No_Lot", "Rev", "Description", "Area", "No_Job", No_Batch,"OrderDate","RecivedDate"
Explanation of problem:
ok the idea is to create a DB that stores all the part numbers the "x" company has, these part numbers have the corresponding field:
1.- Id_Part : is the unique number for each part.
2.- No_Part: Number part of each part that the company uses for there products.
3.- No_Mold: Each Part Number uses a Molding Item, some part numbers use the same Molding Item.
4.- No_Lot: The Lot Number is to keep track of the part numbers in case the client has some issues with the final product. (Its like a tracking number).
5.- Rev: is for Revision control example: A, B or C.
6.- Description: Describes the part number.
7.- Area: name of the department in with the part number is used ( like a type of Part Number).
8.-No_Batch: Its similar to the Lot number, but its an internal number for the company.
9.- Order Date: Date in witch we ordered a part number form a provider.
10.- Received Date: Date when we get that part number from the provider.
This is how I tried to Normalize it
Table1 Name: Parts
Fields: Id_Part, No_Part, Id_Mold, Id_Lot, Id_Rev, Id_Description, Id_Area, Id_job,
Id_Batch, Date_Order, Date_Recived.
Table2 Name: Areas
Fields: Id_Area, Name
Table3: Molds
Fields: Id_Mold, No_Mold, Id_Part
Table4:Jobs
Fields: Id_Job, No_Job
Tablr5:Batchs
Fields: Id_Batch, No_Batch
Table6 Name: descriptions
Fields:Id_Description,Description,Id_Part
Table7 Name:Rev
Fields: Id_Rev,Rev,Id_Part
Any help is useful.
It seems like the PartRevision is the main table here rather than the part. You don't order a Honda Accord, you order a 2013 Honda Accord.
You purchase a PartRevision and it goes into a batch and a lot. You sell a part revision and it pulls from a batch and a lot. Here's how I'd set it up.

Sum specific list items and assign the sum value into a different list

Alright, here's my scenario :
I have 2 custom lists : Orders and Items. The Items list contains a field Description (text) and a Amount Per Item field (calculated). The Orders list contains a Total amount field and a Items field (lookup on the description field in items which allows multiple values selection).
Here's a more visual explanation :
Orders
Total amount
Items (lookup on the description field in items which allows multiple values selection)
Items
Description (text)
Amount per Item
I would like to do the sum of the Amount per Item field of the selected items from the Items lookup field from Orders and put the value of the sum in the total amount field in Orders
Any suggestions? Is it possible to do this in SharePoint 2010 without code? If not, could you show what the code would look like?
Thanks.
You could try
OrderList.Total = OrderList.Items.Sum(item => item.AmountPerItem);

Resources