Hello,
Looks like we don't have parameters “@Period” like “@today”, which we can get Current Period or Last Period or any other period we like directly.
But according to my recent expericence, we can manipulate period in some ways, and I have put the details in the below 2 post:
In short here:
- We can use datatime formula to get the current period like below:
=iif(Month(Now())<10,CStr(Year(Now()))+'0'+CStr(Month(Now())),CStr(Year(Now()))+CStr(Month(Now()))) - We can also join
“PX.Objects.GL.FinPeriods.TableDefinition.FinPeriod” to get periods we want. - We can calculate based on “FinPeriodID” fields like below:
The below is supposed to join a period with its pre Period
=IIf( Right( PItemCustSalesHist.FinPeriodID], 2)='01',CStr( ( Left( DItemCustSalesHist.FinPeriodID], 4)-1))+'12', iItemCustSalesHist.FinPeriodID]-1)