last 12 months query for custom records

Hafsa1
Mega Sage

Hi

I have a custom table(x_app_cost_service) having several records with "period" in format "FY25: M09". attached scrrenshot.

I want to get all records for last 12 months.

suppose today is FY26:M02  (feb month 2026 ), it should calculate 12 months from "FY26:M01" (jan 2026 ) back wards.

Situation happens where some months data not available it should take next month/year data. There could be multiple records for same month. What will be the query to fetch. Because once I get the query I need to calculate the "cost_amount" field for all records. Any idea?

 

 

scrr.jpg

 
 
 
 
 

 

 

 
 
 

 

1 REPLY 1

palanikumar
Giga Sage

Hi,

You can use condition 'Period' greater than or is 'FY25:M01'

 

Thank you,

Palani

Thank you,
Palani