stefanaalten
Board Regular
- Joined
- Feb 1, 2011
- Messages
- 74
- Office Version
- 365
- Platform
- Windows
Hope the MrExcel community is feeling clever 'cos I'm not! I'd appreciate some help with this "simple" question! Oh, and Best Wishes for 2025.
I have data representing stocks: stock name, units held, price, value, cost, gain/loss, date (as at).
I can't modify the source data - it comes pre-supplied (daily download), so I just copy the values (insert rows) into a summary spreadsheet, as shown below (simplified example).
My question consists of two parts - hope that's okay.
1) I'd like to have a pivot table that shows at a glance how stocks have performed. As can be seen below, the data I have already provides "total as at date" (e.g. value) but the ÎŁ Values panel insists of applying a formula ("Summarize value field by"), "sum" by default, which is not what I want. Is there a a way of saying "just show the data as is - no need to "summarize"? Hope I've explained that okay.
2) Then, and this is my main question really, I would like to produce an area chart (or something similar) that shows how each stock has contributed to the total, i.e. time along the horizontal, axis, ÂŁ along the vertical, and each "area" representing a different stock (in different colour for each).
I will have new data to add every day, i.e. another lot of stocks (these may vary over time).
Any help very much appreciated!
Here's my data
I have data representing stocks: stock name, units held, price, value, cost, gain/loss, date (as at).
I can't modify the source data - it comes pre-supplied (daily download), so I just copy the values (insert rows) into a summary spreadsheet, as shown below (simplified example).
My question consists of two parts - hope that's okay.
1) I'd like to have a pivot table that shows at a glance how stocks have performed. As can be seen below, the data I have already provides "total as at date" (e.g. value) but the ÎŁ Values panel insists of applying a formula ("Summarize value field by"), "sum" by default, which is not what I want. Is there a a way of saying "just show the data as is - no need to "summarize"? Hope I've explained that okay.
2) Then, and this is my main question really, I would like to produce an area chart (or something similar) that shows how each stock has contributed to the total, i.e. time along the horizontal, axis, ÂŁ along the vertical, and each "area" representing a different stock (in different colour for each).
I will have new data to add every day, i.e. another lot of stocks (these may vary over time).
Any help very much appreciated!
Here's my data
Account Summary (to illustrate question).xlsx | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | |||
1 | Stock | Units held | Price (pence) | Value (ÂŁ) | Cost (ÂŁ) | Gain/loss (ÂŁ) | Gain/loss (%) | As at (date2) | ||
2 | Stock A | 1,282.36 | 385.37 | 4,941.81 | 4,855.16 | 86.65 | 1.78 | 2024-12-12 | ||
3 | Stock A | 1,282.36 | 385.66 | 4,945.53 | 4,855.16 | 90.37 | 1.86 | 2024-12-13 | ||
4 | Stock A | 1,282.36 | 385.83 | 4,947.71 | 4,855.16 | 92.55 | 1.91 | 2024-12-17 | ||
5 | Stock A | 1,282.36 | 385.51 | 4,943.61 | 4,855.16 | 88.45 | 1.82 | 2024-12-18 | ||
6 | Stock A | 1,282.36 | 384.55 | 4,931.30 | 4,855.16 | 76.14 | 1.57 | 2024-12-20 | ||
7 | Stock A | 1,282.36 | 385.19 | 4,939.50 | 4,855.16 | 84.34 | 1.74 | 2024-12-27 | ||
8 | Stock A | 1,282.36 | 385.59 | 4,944.63 | 4,855.16 | 89.47 | 1.84 | 2025-01-01 | ||
9 | Stock B | 680.39 | 2404.28 | 16,358.46 | 16,250.00 | 108.46 | 0.67 | 2024-12-12 | ||
10 | Stock B | 680.39 | 2397.34 | 16,311.24 | 16,250.00 | 61.24 | 0.38 | 2024-12-13 | ||
11 | Stock B | 680.39 | 2378.74 | 16,184.69 | 16,250.00 | -65.31 | -0.40 | 2024-12-17 | ||
12 | Stock B | 680.39 | 2353.88 | 16,015.54 | 16,250.00 | -234.46 | -1.44 | 2024-12-18 | ||
13 | Stock B | 680.39 | 2315.11 | 15,751.75 | 16,250.00 | -498.25 | -3.07 | 2024-12-20 | ||
14 | Stock B | 680.39 | 2335.66 | 15,891.57 | 16,250.00 | -358.43 | -2.21 | 2024-12-27 | ||
15 | Stock B | 680.39 | 2335.41 | 15,889.87 | 16,250.00 | -360.13 | -2.22 | 2025-01-01 | ||
16 | Stock C | 7,041.41 | 209.26 | 14,734.85 | 14,625.00 | 109.85 | 0.75 | 2024-12-12 | ||
17 | Stock C | 7,041.41 | 209.62 | 14,760.20 | 14,625.00 | 135.20 | 0.92 | 2024-12-13 | ||
18 | Stock C | 7,041.41 | 209.34 | 14,740.48 | 14,625.00 | 115.48 | 0.79 | 2024-12-17 | ||
19 | Stock C | 7,041.41 | 209.15 | 14,727.10 | 14,625.00 | 102.10 | 0.70 | 2024-12-18 | ||
20 | Stock C | 7,041.41 | 207.75 | 14,628.52 | 14,625.00 | 3.52 | 0.02 | 2024-12-20 | ||
21 | Stock C | 7,041.41 | 207.73 | 14,627.11 | 14,625.00 | 2.11 | 0.01 | 2024-12-27 | ||
22 | Stock C | 7,041.41 | 208.25 | 14,663.73 | 14,625.00 | 38.73 | 0.26 | 2025-01-01 | ||
23 | Stock D | 3,984.78 | 264.90 | 10,555.69 | 9,950.00 | 605.69 | 6.09 | 2024-12-12 | ||
24 | Stock D | 3,984.78 | 265.80 | 10,591.55 | 9,950.00 | 641.55 | 6.45 | 2024-12-13 | ||
25 | Stock D | 3,984.78 | 265.60 | 10,583.58 | 9,950.00 | 633.58 | 6.37 | 2024-12-17 | ||
26 | Stock D | 3,984.78 | 264.10 | 10,523.81 | 9,950.00 | 573.81 | 5.77 | 2024-12-18 | ||
27 | Stock D | 3,984.78 | 258.60 | 10,304.65 | 9,950.00 | 354.65 | 3.56 | 2024-12-20 | ||
28 | Stock D | 3,984.78 | 263.70 | 10,507.87 | 9,950.00 | 557.87 | 5.61 | 2024-12-27 | ||
29 | Stock D | 3,984.78 | 261.70 | 10,428.17 | 9,854.62 | 573.55 | 5.82 | 2025-01-01 | ||
30 | Stock E | 436.00 | 1809.20 | 7,888.11 | 8,126.30 | -238.19 | -2.93 | 2024-12-12 | ||
31 | Stock E | 436.00 | 1730.60 | 7,545.42 | 8,126.30 | -580.88 | -7.15 | 2024-12-13 | ||
32 | Stock E | 436.00 | 1661.40 | 7,243.70 | 8,126.30 | -882.60 | -10.86 | 2024-12-17 | ||
33 | Stock E | 436.00 | 1644.20 | 7,168.71 | 8,126.30 | -957.59 | -11.78 | 2024-12-18 | ||
34 | Stock E | 436.00 | 1645.20 | 7,173.07 | 8,126.30 | -953.23 | -11.73 | 2024-12-20 | ||
35 | Stock E | 436.00 | 1628.80 | 7,101.57 | 8,126.30 | -1,024.73 | -12.61 | 2024-12-27 | ||
36 | Stock E | 436.00 | 1633.20 | 7,120.75 | 8,126.30 | -1,005.55 | -12.37 | 2025-01-01 | ||
37 | Stock F | 231.00 | 3586.50 | 8,284.82 | 8,118.20 | 166.62 | 2.05 | 2024-12-12 | ||
38 | Stock F | 231.00 | 3630.50 | 8,386.46 | 8,118.20 | 268.26 | 3.30 | 2024-12-13 | ||
39 | Stock F | 231.00 | 3578.50 | 8,266.34 | 8,118.20 | 148.14 | 1.82 | 2024-12-17 | ||
40 | Stock F | 231.00 | 3551.00 | 8,202.81 | 8,118.20 | 84.61 | 1.04 | 2024-12-18 | ||
41 | Stock F | 231.00 | 3525.00 | 8,142.75 | 8,118.20 | 24.55 | 0.30 | 2024-12-20 | ||
42 | Stock F | 231.00 | 3487.50 | 8,056.13 | 8,118.20 | -62.07 | -0.76 | 2024-12-27 | ||
43 | Stock F | 231.00 | 3489.50 | 8,060.75 | 8,118.20 | -57.45 | -0.71 | 2025-01-01 | ||
44 | Stock G | 7,701.42 | 185.60 | 14,293.84 | 14,625.00 | -331.16 | -2.26 | 2024-12-12 | ||
45 | Stock G | 7,701.42 | 185.60 | 14,293.84 | 14,625.00 | -331.16 | -2.26 | 2024-12-13 | ||
46 | Stock G | 7,701.42 | 185.20 | 14,263.03 | 14,625.00 | -361.97 | -2.48 | 2024-12-17 | ||
47 | Stock G | 7,701.42 | 182.60 | 14,062.80 | 14,625.00 | -562.20 | -3.84 | 2024-12-18 | ||
48 | Stock G | 7,701.42 | 180.50 | 13,901.07 | 14,625.00 | -723.93 | -4.95 | 2024-12-20 | ||
49 | Stock G | 7,701.42 | 182.80 | 14,078.20 | 14,625.00 | -546.80 | -3.74 | 2024-12-27 | ||
50 | Stock G | 7,701.42 | 183.30 | 14,116.71 | 14,625.00 | -508.29 | -3.48 | 2025-01-01 | ||
Sheet1 |