Skip to main content

Hi there,

 

I need some food for thoughts to solve the specific problem in FME. I have a transformation in FME that contains attributes like incident_date, Month, a third column which contains either monthly cumulative average wastage value for the current regulatory year or historic (5 years) monthly average wastage value. I have the fourth column which states that whether the monthly average value belongs to the current regulatory year or historic 5 years.

Now I want to generate the third type of monthly average wastage value called "forecasted value" in such a way that if current month is less than the end month of the current regulatory year, for instance, Today the month is February and end month of current regulatory year is March, then FME get the historic 5 years value of March and add it in the remaining value of current-year average wastage value and labeled it as "forecasted value" in the fourth column.

 

To be honest, I am stuck and don't know how to implement the logic. Any help would be really appreciated.

@muhammad_yasir Would you be able attach a small example of your source data and the result you need? That makes it easier for contributors to create a minimum-working-example.


Also I'd suggest looking at https://knowledge.safe.com/articles/34109/determining-attribute-values-by-testing-with-condi.html -- it seems like conditional values may be what you're wanting here. Note that in conditional values the value itself can be an existing column or some math involving existing columns, which may do what you're needing. (you may also find some of the community posts on conditional values worth perusing -- https://knowledge.safe.com/questions/42502/conditional-attribute-evaluation-one-input-dependi.html for example)


Reply