Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Lookup Record Value from Previous Month

I am trying to understand the most efficient way to look up changes between cell values within an appended query.   Background: Each month a new excel file is appended to create a 'Combined' query ...
  • v-yanjiang-msft's avatar
    v-yanjiang-msft
    3 years ago

    Hi Anonymous ,

    It's my pleasure!

    You can create another calculated column.

    Last month value =
    MAXX (
        FILTER (
            'Table',
            'Table'[Record ID] = EARLIER ( 'Table'[Record ID] )
                && MONTH ( 'Table'[Month] )
                    = MONTH ( EARLIER ( 'Table'[Month] ) ) - 1
        ),
        'Table'[Value]
    )
    

    Result:

    I attach my sample below for your reference.

     

    Best Regards,
    Community Support Team _ kalyj

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