NetSuite Saved Search -- % of Total Summary - netsuite

Not sure if this is possible in a saved search, but I want to run a calculation off the summed summary results and display it on the same line. I have a SUM of quantity column and a SUM of quantity fulfilled. I want another column that does qty fulfilled / qty as a percentage but it has to be calculated at the summary level.
Any help would be greatly appreciated.
formula
results
Basically I want to do the following but based on the summary data only, in order to calculate the total fill rate (fulfilled/qty ordered) rather than an average fill rate per order. I don't know if it's possible in a summary saved search.(NVL({quantitycommitted},0)+NVL({quantityshiprecv},0))/NULLIF({quantity},0)
With the above and with the AVERAGE function, it's giving me the average of the individual order fill rates. I want the aggregate fill rate instead. If there are 10 orders and 9 filled at 90%, 1 at 0%, my current formula gives me 90%. But what if that 1 order had a way higher qty than the other orders? Then it would be misleading to show an average fill rate of 90% because on the order that counted, you missed all the sales.

Here's a similar logic you may use:
((sum({quantityshiprecv})/sum({quantity})) * 100)

#Dars is correct, but I thought I'd give you a picture of what that looks like in the NetSuite UI.
It doesn't matter what fields you Group by, and you can use the Minimum, Maximum, or Average Summary Type for your Formula (Percent) field

Related

Multiple Criteria If Condition - Identify highest number based upon preceding criteria

I am trying to build a bit of a tracker within Excel/Google Sheets to identify which 'home loan' has the combination of highest interest rate PLUS loan/mortgage size.
The formula I've built so far works for the below conditions;
There is only 1 loan with the highest interest rate, or;
If there are multiple loans that have the highest interest rate, the loan that is the largest is included within that condition.
Where this formula doesn't work is when;
When there are multiple loans with the highest interest rate, however these loans are NOT the largest loan size... I believe the issue is due to the fact I'm including a 'max' statement as part of the match condition. Please see cell reference I8:L10 as an example.
I'm unsure how to achieve this within a formula to identify;
The loan with the highest interest rate
Of the loans with the highest interest rate, which has the largest mortgage/loan size.
Please note the Interest Rate's vary within the data set
Formula Used:
=if(countif($E3:$H3,max($E3:$H3))>1,
if(iserror(index($E$1:$H$1,match(1,(max($E3:$H3)=E3)*(max($A3:$D3)=A3),0))=I$1),"Inactive","Active"),
if(index($E$1:$H$1,match(max($E3:$H3),$E3:$H3,0))=I$1,"Active","Inactive"))
Link to spreadsheet
https://docs.google.com/spreadsheets/d/1GHN8-uX4RdkMz0IIvTTxB0TjAKtUMSdCTFHqXNgHVm4/edit?usp=sharing
Thanks in Advance!
You can use =FILTER($E3:$H3,$E3:$H3-Max($E3:$H3),"") to create an array of all loans with the highest interest rates. I suppose it ought to be possible to create a matching array of loan sizes and then extract the highest of these. However, the task appears intimidating.
Meanwhile I wonder if this much simpler approach will allow you to get to your desired result using simple IF functions.
=IF(A3=MAX($A3:$D3),"Hi loan","Low loan") & " / " & IF(E3=MAX($E3:$H3),"Hi Rate","Low rate")
You chose "Active" and "Inactive". I chose "Hi" and "Low". Both of these are translations of True and False and may be used in conditional formatting, for example, where you simply highlight loans with the highest interest rate in one colour, and choose a different colour where the highest rate is applied to the largest loan. The simple logic I express here can be expressed in words, too. It's just a matter of interpreting the two results provided by my formula to best suit your needs.

Changing Average Formula in pivot table depending on filter

I have a group of data with the following fields:
Code, Product, Rate, Volume
Each code has multiple products. On each row of the pivot table is a code, and the table has a product filter. The Rate is the value in the table. I want that rate to change depending on a combination of products selected.
E.G. If Code A has:
Product A, 2% Rate, $1000 Volume
Product B, 3% Rate, $3000 Volume
Product C, 1% Rate, $1000 Volume
I want the rate field to display 2.4% when all are selected, 2.75% when A&B are selected, 1.5% when A&C are selected and 2.5% when B&C are selected.
How do I do this? Currently, I am only able to have the rate field display an average or a sum, which is not right. I.E. in the above example, average would display 2%, which is not accurate.
Its a little convoluted, but I think this gets at what you want.
In your original table of data, create a helper column that multiplies Rate by Volume. I will refer to this column as Helper.
Select your pivot table, then go to Analyze>Calculations>Fields Items & Sets> Calculated Field
Name your new field Weighted Average then for your formula enter Helper/Volume, then select Add
Your calculated field will now show the weighted average for each Code based on the filtered Products. It worked for your simple example, I would think it would work for your larger table.

How to calculate relative average cost by department in excel?

So I am trying to calculate the average cost of On-Hand goods in this example. The goal of this would be to determine the overall cost of goods by department. This would be achieved arithmetically by taking the average cost of the good and multiplying it by the number of goods on hand for that item, and then repeating for each item. I would then want to add items from the same numerical departments to get a department item cost. Is there a way to do this within a single function in excel? So far I have:
=IF($B$2:$B$17=F2,SUMPRODUCT($C$2:$C$17,$D$2:$D$17),"null")
but it is returning an invalid output.
For Cell J2, the output I would want to look for is: $74093.80
The reason I want to do this by function is because I have a spreadsheet with over 76,000 items and 19 different departments on it and need to calculate the Average Inventory Cost of each Department.
Thank you in advance!
Click here for Excel sheet
Put the test inside the SUMPRODUCT():
=SUMPRODUCT(--(B$2:$B$17=F2),$C$2:$C$17,$D$2:$D$17)

Spotfire - Finding Percentage of Subtotals

I'm trying to turn a cross table that looks like this
into a table which shows the subtotals and percentage over each Group like the example below
Where the percentage is the sales of each product divided by the total sales in each group, so for Product A = 20 / (20+40+30) = 22%
So far, I've managed to use Spotfire built-in subtotal function and the following expression to almost achieved the table I want
Sum([Sales) / Sum([Sales]) OVER (Intersect(Parent([Axis.Rows]),All([Axis.Rows])))
but the only problem is that the percentage for my subtotal row doesn't seems to equal to 100%, instead it is taking the subtotal sales divided by the grand total for all groups, meaning 90 / (90+140) = 39%
Can anyone advise me where did I go wrong and how do I resolve this? Thanks
You didn't go wrong anywhere but your subtotals aren't going to work out how you want. The Subtotals are calculated by Spotfire automatically on the underlying grouped data. So in this case, the subtotal is going to be for the first node of your hierarchy (group). i.e. Groups 1 and 2. You aren't going to be able to change it with your current layout. As you know, subtotal is a portion of the grand total. Grand total is for the entire Cross Table, which will be 100% no matter what your data is. Thus, it's impossible for the sums of 2 or more subtotals to be > 100%. Your subtotal is the SUM of the values calculated off of this formula:
Sum([Sales]) THEN [Value] / Sum([Value]) OVER (All([Axis.Rows])) as [% of Total]

How do I get the proper average in a pivot based on pivot data?

I'm trying to get the average number of "on time shipment" based on items rolled up to "ship numbers" and then by "order number". I have one order number in this scenario that is shipped via multiple shipments. It seems to me that after rolling it up via PowerPivot and then creating a pivot table, it's calculating the average based on the total lines of the "order number" instead the pivot.
PowerPivot Data:
Pivot based on data above:
How can I get the average number based on the pivot table rather than the PowerPivot total data of the order number? I'm probably not making any sense, but hopefully the images below explain it better. As you can see, when you roll up the items by ship number then by order number, you'll see that the actual average is 0.6 but the pivot is showing 0.5.
Help!
Technically speaking, the average is correct - if you look at the source data, for some reason all rows are duplicated and if you do regular average calculation, it's actually 0.5.
What you are looking for is calculating average for distinct values, which can be done easily with AVERAGEX function.
I have copied your table and created those 2 Calculated Fields (in Excel 2010, it's Measures):
Average on Time:
=AVERAGE(Table1[On Time])
Average on Time (UNIQUE)
=AVERAGEX(VALUES(Table1[Ship Number]), [Average on Time])
Using AverageX with VALUES() function makes it easier to calculate any expression ONLY for unique values.
If you then put both measures on PivotTable, you should get this:
First column is same as yours (using "regular" AVERAGE function). The second one shows the average calculated over distinct (unique) values of Ship Numbers.
Hope this helps.
PS: This great article by Kasper de Jonge helped me quite a bit with similar scenarios.

Resources