Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Getting the latest Total value

Hi, I would like to use DAX measurement to Display the Latest Total Value with reference to the time.

 

If I use Max, the value will only show 625, but i want it to display 600 as thats the latest updated value

 

Please help

  • Hi Anonymous ,

     

    See below,
    Let me know if you have any questions. I used a test in there so we didn't get zero.

    If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
    Nathaniel

     

     

     

    Latest time Total = 
    var LateTime = CALCULATE(Max('Table'[Time]),'Table'[Completed]>0)
    var LatestValue = CALCULATE(MAX('Table'[Total]),'Table'[Time]=LateTime)
    
    return LatestValue

     

2 Replies

  • Nathaniel_C's avatar
    Nathaniel_C
    Icon for Community Champion rankCommunity Champion

    Hi Anonymous ,

     

    See below,
    Let me know if you have any questions. I used a test in there so we didn't get zero.

    If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
    Nathaniel

     

     

     

    Latest time Total = 
    var LateTime = CALCULATE(Max('Table'[Time]),'Table'[Completed]>0)
    var LatestValue = CALCULATE(MAX('Table'[Total]),'Table'[Time]=LateTime)
    
    return LatestValue

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thankyou Nathaniel_C

       

      I changed the 'Table'[Completed] to 'Table[Total]

      and i was able to achieve the total line when the last updated time was 9am

       

       


      Nathaniel_C wrote:

      Hi Anonymous ,

       

      See below,
      Let me know if you have any questions. I used a test in there so we didn't get zero.

      If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
      Nathaniel

       

       

       

      Latest time Total = 
      var LateTime = CALCULATE(Max('Table'[Time]),'Table'[Completed]>0)
      var LatestValue = CALCULATE(MAX('Table'[Total]),'Table'[Time]=LateTime)
      
      return LatestValue