Finding max value per id in a stacked data table

forrestgump

New Member
Joined
Sep 30, 2010
Messages
22
Hi there,

I have 2 tables. 1 called 'HeadcountTble' the other called 'SurveyTble'. The 'HeadcountTable' is normalized and has unique ids per person. The SurveyTble has multiple rows per person. The tables are linked 1 to many from the 'HeadcountTble' to the 'SurveyTble'. What i want to do is extract the max Report date per person in the survey table and enter it into a column in the 'HeadcountTble' or create a measure to be able to do this, or both if possible (As a measure and a calculated column).

I have tried as a calculated column for now 'Report Date = MAX(SurveyTble[Report date])' however this gives the maximum value over the whole table. I am guessing I need to filter the table first by the id and then find the max Report date from that table???

I will keep trying but any help would be greatly appreciated.

Kind regards,

Forrestgump
 

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.
I think I have found the answer I can just use LastDate(SurveyTble[Report Date]) as either a column or a measure.
 
Upvote 0
So I have discovered it works great as a calculated column in my headcount table however not quite as a measure. I think there will be a clever way of writing as a measure though! Any ideas?
 
Upvote 0

Forum statistics

Threads
1,213,544
Messages
6,114,249
Members
448,556
Latest member
peterhess2002

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