Forum Discussion
davidap
2 years agoAdvocate I
DAX Retrieve value from another row and column within table based on matching criteria
Problem New Column Aggregate ID should return the Index ID where the User matches and Paid Date is between the First and Last Service dates of an Index ID. The Index ID marks a major event with Aggr...
- 2 years ago
Hi, davidap
You can try the following methods.
Aggregate ID = CALCULATE ( MAX ( 'Table'[Index ID] ), FILTER (ALLEXCEPT( 'Table','Table'[User]), [Paid Date] >= 'Table'[First Service] && [Paid Date] <= 'Table'[Last Service] ) )Is this the result you expect? Please see the attached document.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
davidap
2 years agoAdvocate I
Thanks all. I built a solution last night that put a deduplicated list User, First/Last Service Dates, and the Index IDs (minus blanks) into another table then did CALCULATE+FILTER to pull in the value in the User and Paid dates were within spans. I also assigned Index IDs to those with the highest $ on those dates, in case multiple indices were found.