Forum Discussion
TaufikMaggangka
3 years agoHelper II
Retrive Status From other table using Date range
Hi Everyone, Really need help from expert to retrive status from other table using date parameter and ID. Here my case : Table 1 Id Joining Date Position 1 1 January 2021 Teacher 1 ...
- 3 years ago
Are the two tables linked via ID column? Are you looking for a measure or a calculated column?
- 3 years ago
TaufikMaggangka
Yes you are right, I did it the other way around which was wrong.Please refer to attached sample file with the solution
Position = VAR T1 = RELATEDTABLE ( 'Table 1' ) VAR T2 = FILTER ( T1, VAR CurrentAttendanceDate = 'Table 2'[Attendance Date] VAR CurrentJoiningDate = 'Table 1'[Joining Date] VAR T3 = FILTER ( T1, 'Table 1'[Joining Date] > CurrentJoiningDate ) VAR NextJoiningDate = COALESCE ( MAXX ( T3, 'Table 1'[Joining Date] ), TODAY ( ) ) RETURN CurrentAttendanceDate >= CurrentJoiningDate && CurrentAttendanceDate < NextJoiningDate ) RETURN MAXX ( T2, 'Table 1'[Position] )
tamerj1
3 years agoCommunity Champion
Are the two tables linked via ID column? Are you looking for a measure or a calculated column?