Finding the latest trend in a dataset

JamesCanale

Well-known Member
Joined
Jan 13, 2021
Messages
1,177
Office Version
  1. 365
Platform
  1. Windows
I have data that has many monthly records for each item. What I want to get is a new table with each item appearing once and the change between the current month and the prior month.

How can this be done best? This is how I would do it in excel. It's not as elegant (in excel) as I would like it.

MrExcelPlayground21.xlsx
ABC
2ItemDateThing
3A12/1/202350
4A1/1/202452
5A2/1/202454
6A3/1/202454
7B12/1/2023400
8B1/1/2024400
9B2/1/2024400
10B3/1/2024410
11C12/1/2023100
12C1/1/2024120
13C2/1/2024120
14C3/1/2024105
15
16ItemChange in Last month
17A0
18B10
19C-15
Sheet4
Cell Formulas
RangeFormula
B17:B19B17=LET(a,FILTER($B$3:$C$14,$A$3:$A$14=A17),b,SORT(a,1,-1),c,TAKE(b,2),d,DROP(c,,1),e,TAKE(d,1)-TAKE(d,-1),e)
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Hi again!

Add this measure:

Excel Formula:
M_Diff =
 CALCULATE(
    MAX(tbl_Projects[Thing]),
    tbl_Projects[Date] = MAX(tbl_Projects[Date])
  ) -
  CALCULATE(
        MAX(tbl_Projects[Thing]),
        PARALLELPERIOD(tbl_Projects[Date],-1,MONTH)
    )


Then create a table in your report again. Add the Item column and the measure above.

1709318075502.png
 
Upvote 0
Solution

Forum statistics

Threads
1,215,094
Messages
6,123,069
Members
449,092
Latest member
ipruravindra

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top