Forum Discussion

abehrmann's avatar
abehrmann
Helper II
6 years ago

Display last Note based on Date entered

I am hoping to display the last note entered based on date entered.  

 

i have service ticket table and notes table, the relation ship is one to many. 

 

I have concatenated the ID field on the notes table with the notes and sorted by ID field. 

 

But it is not sorting correctly. 

 

Can use dax to show the last note based on the ID field or Date entered.  

 

 

2 Replies

  • abehrmann you can try something like this

     

    Last Note =
    VAR __lastDate = CALCULATE ( MAX ( NotesTable[Date] ), ALLEXCEPT ( NotesTable, NotesTable[Id] ) )
    RETURN
    CALCULATE 
    ( MAX ( NotesTable[Notes] ),
    ALLEXCEPT ( NotesTable, NotesTable[Id] ),
    NotesTable[Date] = __lastDate
    )

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

  • v-alq-msft's avatar
    v-alq-msft
    Community Support

    Hi, abehrmann 

     

    Could you please share some sample data and expected result with OneDrive for Business? Do mask sensitive data before uploading.

     

    Best Regards

    Allan