Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!View all the Fabric Data Days sessions on demand. View schedule
Hello,
I am trying to use a Matrix to display this data so that I can nest the columns. I want to show the most recent Sample Date and the coresponding Action and Lab report number. The Matrix summarizes these fields seperately. How can I ensure the Action and Lab report number are coming from the same row as the Latest Sample Date?
Solved! Go to Solution.
@austinhammer So this is a double lookup. Watch the end of this video for the technique.
@austinhammer So this is a double lookup. Watch the end of this video for the technique.
Thanks @Greg_Deckler - great video!
RecentAction =
VAR __Table = 'SOS'
VAR __MaxDate = MAXX(__Table, [Sample Date])
VAR __ActionTable = FILTER(__Table, [Sample Date] = __MaxDate)
VAR __Result = SELECTCOLUMNS(__ActionTable, [Action])
RETURN
__Result
@austinhammer So I would normally implement it as something like this:
RecentAction =
VAR __Table = 'SOS'
VAR __MaxDate = MAXX(__Table, [Sample Date])
VAR __ActionTable = FILTER(__Table, [Sample Date] = __MaxDate)
VAR __Result = MAXX(__ActionTable, [Action])
RETURN
__Result
RecentLab =
VAR __Table = 'SOS'
VAR __MaxDate = MAXX(__Table, [Sample Date])
VAR __ActionTable = FILTER(__Table, [Sample Date] = __MaxDate)
VAR __Result = MAXX(__ActionTable, [Lab])
RETURN
__Result
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 16 | |
| 11 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 31 | |
| 22 | |
| 20 | |
| 17 | |
| 12 |