Forum Discussion

Mp1977's avatar
Mp1977
Icon for Helper II rankHelper II
6 years ago
Solved

Last Value in the table

Hi !

I'm trying to get last value in the table that represent the actual balance. I tried LASTNONBLANK but it need a expression. I used 1 as the expression but I got the larger number for the last date, 22.908, but I need the number 22.818.


 

 

 

 

 

 

I appreciate any help.

Thank you

  • Hi Mp1977 ,

     

    Create an index column in the query editor then create a measure like this.

    Measure 2 = CALCULATE(LASTNONBLANKVALUE('Table (2)'[Index],SUM('Table (2)'[value])))

     

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

7 Replies

    • Mp1977's avatar
      Mp1977
      Icon for Helper II rankHelper II

      Hi ! The logic is that number is the last row in the table.

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

    Mp1977 

     

    =CALCULATE([Measure],LASTDATE('Date'[Date]))
     
    Throw that into a card and you will see the max balance
     
     
    //If this is a solution please mark as such
    • Mp1977's avatar
      Mp1977
      Icon for Helper II rankHelper II

      Thank you for the reply ! But I need the last row value, the Max will bring other value than the last one, with the balance is higher at the beggining of the day.

  • V-lianl-msft's avatar
    V-lianl-msft
    Icon for Community Support rankCommunity Support

    Hi Mp1977 ,

     

    Create an index column in the query editor then create a measure like this.

    Measure 2 = CALCULATE(LASTNONBLANKVALUE('Table (2)'[Index],SUM('Table (2)'[value])))

     

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