Forum Discussion

BiBra's avatar
BiBra
Helper III
8 years ago
Solved

latest Values

Hello, I am trying to find out how to get the latest values. Dummy data:

 

Name                Date                  Value 1            value2       value 3

sd                    12/10-2017               1                     0               1

tx                     12/10-2017               0                     1               0

sd                     13/12-2017               1                    1               0

 

I would like to be able to diplay the latest data for each "name", how to do this? I need a simple way to this,  because I have 53 "values". The ideal solution for me, would be to generate a table with only the latest values. So it automatically updates, and I am able to use the information as fit.

  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    8 years ago

    BiBra

     

    NOw you can use this MEASURE

     

    Value at Recent Date =
    CALCULATE (
        SUM ( TableName[Value] ),
        FILTER ( TableName, TableName[Date] = MAX ( TableName[Date] ) )
    )

13 Replies

  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    Community Champion

    BiBra

     

    One of the ways of doing it is to create a Calculated Table

     

    Go to Modelling Tab >>> NEW TABLE

     

    New Table =
    SUMMARIZE (
        TableName,
        TableName[Name],
        "Date", MAX ( TableName[Date] ),
        "Value 1", CALCULATE (
            SUM ( TableName[Value 1] ),
            FILTER ( TableName, TableName[Date] = MAX ( TableName[Date] ) )
        ),
        "Value 2", CALCULATE (
            SUM ( TableName[Value 2] ),
            FILTER ( TableName, TableName[Date] = MAX ( TableName[Date] ) )
        ),
        "Value 3", CALCULATE (
            SUM ( TableName[Value 3] ),
            FILTER ( TableName, TableName[Date] = MAX ( TableName[Date] ) )
        )
    )
    • BiBra's avatar
      BiBra
      Helper III

      Any easier way? I have 53 "values"