Forum Discussion
How to pull most recent data based on a a data value from another table.
- 4 years ago
Hi drivas771994 ,
According to your description, you have two tables, SPARTA_SCANS2 and TESTS, I create a sample.
Test table:
SPARTA_SCANS2 table:
You want to get the Body weight of the latest Test Date which are greater than current Scan Date.
Here's my solution.
Most Recent Body Mass = MAXX ( FILTER ( ALL ( 'TESTS' ), 'TESTS'[Date] = MINX ( FILTER ( ALL ( 'TESTS' ), 'TESTS'[Date] >= MAX ( 'SPARTA_SCANS2'[Date] ) ), 'TESTS'[Date] ) ), 'TESTS'[Bodyweight] )Get the correct result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi drivas771994 ,
According to your description, you have two tables, SPARTA_SCANS2 and TESTS, I create a sample.
Test table:
SPARTA_SCANS2 table:
You want to get the Body weight of the latest Test Date which are greater than current Scan Date.
Here's my solution.
Most Recent Body Mass =
MAXX (
FILTER (
ALL ( 'TESTS' ),
'TESTS'[Date]
= MINX (
FILTER ( ALL ( 'TESTS' ), 'TESTS'[Date] >= MAX ( 'SPARTA_SCANS2'[Date] ) ),
'TESTS'[Date]
)
),
'TESTS'[Bodyweight]
)
Get the correct result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.