Is this needed to be done in the script? If yes, then try this
Table:
LOAD *,
Date#(Month&'-'&Year, 'MMM-YYYY') as MonthYear;
LOAD Mob_No,
Month,
Year
FROM
[..\..\Downloads\Sample_Test.xlsx]
(ooxml, embedded labels, table is Raw);
FinalTable:
LOAD *,
If(Mob_No = Previous(Mob_No), 'Repeat', 'Fresh') as Result
Resident Table
Order By Mob_No, MonthYear;
DROP Table Table;
Identify duplicate records upto Previous quarter.qvw