I need a DAX measure that compares latest version of financial data against prior version

My data table has an'asof' column to tag which version the data originates from (100K+ rows)

For example, I would like to compare the full yr 2019 cash number asof Sept 2019 vs. the full year 2019 cash number as of August 2019

The current formula I am using isnt working

=calculate([total cash],datesinperiod(Consolidated_PTS[as of Date],LASTDATE(Consolidated_PTS[as of date]),-1,month))

Can anyon recommend a solution?