Forum Discussion
DAX ? How to extract a value from another table based the value of multiple columns in that table?
- Anonymous4 years ago
Hi 3lj ,
If you want a calculated column, please try.
Start Date = VAR _table = RELATEDTABLE ( 'Projects' ) VAR _mindate = CALCULATE ( MIN ( 'Tasks'[Stage Complete] ), _table ) RETURN _mindateEnd Date = VAR _table = RELATEDTABLE ( 'Projects' ) VAR _maxdate = CALCULATE ( MAX ( 'Tasks'[Stage Complete] ), _table ) RETURN _maxdateBest Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
3lj , Seem like they are min and max date
Start = Min(Table[Stage Complete])
or minx(filter(Table, Table[Stage] = "Stage 1" ), Table[Stage Complete])
For End
end =
Max(Table[Stage Complete])
or Maxx(filter(Table, Table[Stage] = "Stage 4" ), Table[Stage Complete])
- 3lj4 years agoFrequent Visitor
Yeah, there might be other stages added later, so I'm going to try the second option, which specifcally says "Stage 1".
Although, forgive me, if I don't see it, how does this take into account / filter based on "project a" or "project b"? (i.e. the current "'row" of the Projects Table?). That's what I'm conceptually struggling with 😞
(as wouldn't it find the "first" start date of all of the projects?, not just the project of the current row?)
Thank you for your help and assistance!