Hello Manaswini,
You can try following steps-
1) Define HKFPER@MONPRODCUST = PERIODID2(which represents monthly level) ------ Input any key figure which is at MONPRODCUST
2) Take the Max of period ID in dynamic planning level
HKFPER@PER = MAX(HKFPER@MONPRODCUST) ------ Here PER has all time levels as MONPRODCUST but no root
3) Determine the last period-
PERIODID@PER1 = HKFPER@PER ------- Here PER1 has all time level attributes as PER with PERIODID as root. This step will determine the last month of the requested time level.
Remaining steps of joining this HKFPER with the desired key figure will be same as you did for weekly levels.
Thanks,
Rohit