Calculated fields - sum of products - excel

I tried to calculate a sum of a product (in the example: quantity product price), so If I sum all the products, I get a value (the dynamic table in the upper side). But when I enter the calculated field quantity*product, Excel got a sum of all the quantity product the sum of all the prices.
How can I solve that?
In this image, I have a table with the data that I want to show through a pivot table
If a put the column Total in the Value section, i get the sum of all the Total values, considering Total as a multiply of quantity and price
In this table, I put the calculate field quantity*price to get the sum, but I got the sum of quantity multiply the sum of price
The calculate field

It appears that you've done this:
But you should have done this:
To sum the individual months you can do this:
Or even this:

Related

subtract two column pivot table using calculated value

I need to find the average of profit by subtracting ( average budget from average revenue ) , both these two column calculated by pivot table
I tried to input this in the calculated field: =AVERAGE('Box Office Revenue ($)')-AVERAGE('Budget ($)')
and then summarized field value to Average but still show summation.
i don't need to subtract the summation of these two column but i need to subtract the averages.
Can you please support in that.

Excel: Extracting data based on range

I have a table for the number of products sold:
I have another table that calculates the cumulative product sold
I have a price table based on # of product sold:
What equation should I write to get the cost price of the product based on cumulative data? Basically, as the cumulative product for category A is less than 10 till 2022 the multiplier price is $5 but in 2023 as the cumulative product is more than 10 the multiplier is $3.
Please know that the actual data set has a price multiplier for multiple range and the number of products sold is in million. The above is just a sample.
Lose the < character in the Item column of the price table. Then you can use it for an approximate lookup.
Let's say the price table is on a sheet called PriceSheet and starts in cell A1, so the first row of data is in row 2. The price table must be sorted ascending by the first column. To look up the price use
=vlookup(A1,PriceSheet!$A$2:$B$5,2,1)
Multiply that with the count.
=A1*vlookup(A1,PriceSheet!$A$2:$B$5,2,1)
Now just change A1 to the cell that has the cumulative count.

Compare column value with series of auto sum value in Power Pivot?

I have problem where i need to get the number of weeks after which my stock will run-out.
In my table i have:
"Forecast Regulier calc." which is the total sales.
And the auto generated total is the project stock.
Each value of "Forecast Regulier calc." in column is the sales on that particular week. Now the goal is to compare the sales of each week with the series of all auto generated total values and get the difference in column values where the two values match. And this will be the number of weeks after which our stock will run-out.
Please let me know if the description is not clear.
.

Sum of specific number of rows for a id in excel

I am pretty new to excel formulas. I want to calculate the sum of prices for every unique id. Using SUMIF I was able to do that for every unique id but I only want to calculate the sum of a number of rows for that id.
=SumIF(A:A;C2;B:B)
Sample data is attached. Actual data set is quite large. For Example, For Id 1, I only want to calculate the sum of first 3 rows (Column price) corressponding to that id, for id 2 the sum of first 4 rows and so on.
Sample data:
This formula works for sorted and non sorted data:
=SUMIF($A$2:INDEX(A:A,AGGREGATE(15,6,ROW($A$2:$A$20)/($A$2:$A$20=C2),D2)),C2,$B$2:INDEX(B:B,AGGREGATE(15,6,ROW($A$2:$A$20)/($A$2:$A$20=C2),D2)))
Enter this as an array formula (ctrl+shift+enter):
=IFERROR(SUMPRODUCT(IF(ROW($A$2:$A$20)>SMALL(IF($A$2:$A$20=C2,ROW($A$2:$A$20),FALSE),MIN(D2,COUNTIF($A$2:$A$20,C2))),0,1),IF($A$2:$A$20=C2,1,0),$B$2:$B$20),0)

Dynamic SUM formula in Excel - Volume price list analysiis

Hello I am hoping it is possible to create a SUM field on my Product order form so that it dynamically changes what values are selected. I have many suppliers who offer discounts on all parts based on hitting certain purchase thresholds. For example
Product A is $10 each, if my total order of Product A-Z exceeds $10,000 then Product A price falls to $9, if my total order for Product A-Z exceeds $25,000 then Product A Price falls to $8 Each of these price drops are represented in a field
[Item] [Description] [Base Price] [DiscountPrice1] [DiscountPrice2] [DiscountPrice3] [Order QTY]
I assume I will need to add a field that does [Order QTY] * [Price ] but that price will depend on the SUM of all of these fields.
I thought about doing 1 Sleeper column for each Price column so it gives me the overall SUM at the buttom for each column and then I just select the end price based on the multiple sums, but was hoping for something cleaner.
Thank you
Read Up on the SUMPRODUCT() function - Here is a good explanation
Use SUMPRODUCT to calculate the total cost of the order using the base price, and then wrap it in two IFs to account for the two threshholds. IF it's below 10k, use the SUMPRODUCT with the base price, if it's above 10k, use the SUMPRODUCT referencing the second price, etc...

Resources