Can you confirm that the Key field of the table is the YYYY-MM and also is it in that format like 2021-09 for September?
OK, assuming that is true, we need to make a field to connect to the the table to itself to access the previous month.
This should work to calculate the previous month's YYYY-MM
var number YYYY = ToNumber(Left([YYYY-MM],"-"));
var number MM = ToNumber(Right([YYYY-MM],"-"));
var number PrevYYYY = If($MM=1, $YYYY-1, $YYYY);
var number PrevMM = If($MM=1, 12, $MM-1);
List("-", ToText($PrevYYYY), PadLeft(ToText($PrevMM), 2,"0"))
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------