I have a client that wants their report titles to include the following verbiage:
“For the X Months Ending DATE”
Where X equals the number of months (in words, not number) the report represents, and DATE is the period end date (in standard MMMM d, YYYY format).
What is the best formula/format to attain this outcome?
Thank you in advance.
Page 1 / 1
To help with X could you let us know the type of report? If this is a trailing 6 month P&L it would be different than a YTD P&L. Please also let us know the first financial period - is the fiscal year structured?
It is a P&L report. One version would be for the current period and YTD and the other would be for the current period, YTD, and budget spend comparison. The X refers to how many months the YTD contains and will change every month. Additionally, there is a 13th adjustment period that would still need to only state “12 months”.
I accomplished this using:
='For the ' + IIf(CInt(Left(@StartPeriod,2))<>13,CInt(Left(@StartPeriod,2)),'12') + ' Months'
If the report could be printed for any range, like periods 3 to 6 or 6 to 12, etc., versus always starting with period 1, then I think the iff statement needed will be too long. Acumatica will trucate the IIF statement - the report designer can only accept so many characters - There is a limit.
Disclaimers: 1) I didn’t test this idea, 2) I am not a programmer.
Laura
Thank you both so much. I really appreciate the quick response. I am sure my client will be very pleased with the results! Have a great day.