Forum Discussion

RanHo's avatar
RanHo
Icon for Helper V rankHelper V
2 years ago
Solved

How to get/display latest/recent comments per user

Good day! I need help on this problem, I need to get or show the latest/most recent comments of user in table, here is my sample data/table: as you can see I have employee and comment...
  • ryan_mayu's avatar
    ryan_mayu
    2 years ago

    RanHo 

    you can create columns

    comments date = maxx(RELATEDTABLE(comments),'comments'[COMMENTS DATE]
    comments = maxx(FILTER(RELATEDTABLE(comments),'comments'[COMMENTS DATE]='employee'[comments date]),comments[COMMENTS])
     
     
    or create measures
     
    commentdate = max('comments'[COMMENTS DATE])
    cid = maxx(FILTER(comments,comments[COMMENTS DATE]=comments[commentdate]),comments[COMMENTS])
     
     
     
    pls see the attachmetn below