- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Get value of column based on lastest date
I have a column with AcctNum, Insurance, Date, Status, Paid Date
Entries may look like this
123456 CB 12-14-18 PAID 2-14-18
123456 MPA 1-16-18 REJECTED 2-16-18
123456 MBI 2-16-18 BILLED
654321 CPA 1-15-18 BILLED
654321 CB 1-15-18 BILLED
I need to get the Insurance Value from the last entry
So for 123456, I would need to get MBI
For 654321 I would get CB
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you add an index column and you data looks like the following:
Then to get the results you desire, then use the following formula:
Measure = CALCULATE( MAX(Table1[Insurance]), FILTER(Table1,Table1[Index] = MAX(Table1[Index])) )
And you will get the correct results:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think you would have to add some sort of index that increases incrementally as you add entries. I don't believe DAX has a way to access the entry order of records.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If I add an index column, what would it take to get the latest one?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you add an index column and you data looks like the following:
Then to get the results you desire, then use the following formula:
Measure = CALCULATE( MAX(Table1[Insurance]), FILTER(Table1,Table1[Index] = MAX(Table1[Index])) )
And you will get the correct results:

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
08-16-2024 12:23 AM | |||
03-20-2024 01:56 AM | |||
Anonymous
| 12-28-2023 06:37 PM | ||
02-17-2024 11:15 AM | |||
03-03-2024 09:52 PM |
User | Count |
---|---|
83 | |
80 | |
47 | |
37 | |
37 |