Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Lastdate

Hello Team,

 

I need help creating a table to show the last balance for my products. My table looks like the below:

 

DateDescriptionBalance
11/11/2022A30
11/11/2022B25
10/11/2022C25
01/11/2022D20
20/10/2022A25
20/10/2022B20
19/10/2022C30
17/10/2022D21
08/09/2022A19
08/09/2022B19
07/09/2022C20
07/09/2022D18
07/09/2022E22

 

I need an answer like below:

 

DateDescriptionBalance
11/11/2022A30
11/11/2022B25
10/11/2022C25
01/11/2022D20
07/09/2022E22

 

I tried using the lastdate function but it is not working. Any idea?

 

Thank you.

 

Kind Regards,

 

Hasvine

4 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi AbbasG,

       

      I appreciate your help.

       

      It works fine. However, if you have two transactions on the same date the table shows both transactions.

       

      Example:

       

      DateDescriptionBalance
      17/11/2022A25
      17/11/2022A30

       

      I need to show the latest. Is there a way?

       

      Many thanks for your help.

       

      Kind Regards,

       

      Hasvine

       

       

       

      • AbbasG's avatar
        AbbasG
        Icon for Memorable Member rankMemorable Member

        Anonymous per my experience, there should be some data point basis on which we can identify the latest transaction. for example time stamp or a combination of date and time instead of just date.

         

        Does your data have something like that??

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Anonymous ,

     

    Here are the steps you can follow:

    1. Create calculated table.

    Table 2 =
    FILTER(
        ALL('Table'),
        'Table'[Date]=MAXX(FILTER(ALL('Table'),'Table'[Description]=EARLIER('Table'[Description])),[Date]))

    2. Result:

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly