Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
I want to create a new column that consists of the previous month's value for a given Category.
For example, if the data I'm given is as follows:
Month | Category | Price |
1/1/2024 | Car | 1000 |
1/1/2024 | House | 2000 |
2/1/2024 | Car | 900 |
2/1/2024 | House | 2000 |
2/1/2024 | Insurance | 600 |
3/1/2024 | Car | 800 |
3/1/2024 | House | 2000 |
4/1/2024 | Car | 700 |
4/1/2024 | House | 2000 |
5/1/2024 | House | 2500 |
6/1/2024 | Car | 600 |
6/1/2024 | House | 2000 |
I would want the new column to look like this:
Month | Category | Price | Previous Month Value |
1/1/2024 | Car | 1000 | |
1/1/2024 | House | 2000 | |
2/1/2024 | Car | 900 | 1000 |
2/1/2024 | House | 2000 | 2000 |
2/1/2024 | Insurance | 600 | |
3/1/2024 | Car | 800 | 900 |
3/1/2024 | House | 2000 | 2000 |
4/1/2024 | Car | 700 | 800 |
4/1/2024 | House | 2000 | 2000 |
5/1/2024 | House | 2500 | 2000 |
6/1/2024 | Car | 600 | |
6/1/2024 | House | 2000 | 2500 |
If there is no data for the previous month for the given category, the "Previous Month Value" should be null.
Solved! Go to Solution.
@Anonymous
Proud to be a Super User!
@Anonymous
Proud to be a Super User!
User | Count |
---|---|
64 | |
59 | |
47 | |
33 | |
32 |
User | Count |
---|---|
84 | |
75 | |
56 | |
50 | |
44 |