I've been sent a spreadsheet with a series of rent entries. The name of the property, the dates and rent are the fields which are important.
For each entry, which is a single line per rent payment, there may be an increase in the amount. This can be after 1 line, or 20. Basically, I need to only keep the entries which show an increase in rent amounts.
Trying to find these entries and automate them seemed simple at first - but has stumped me.
If anyone has any ideas, I'll be very grateful.
Thank you
Best answer by fhilding
fhildingwrote:
Hi Joe! I attached a workspace that uses attribute creator with adjacent features to solve how I interpreted your question. It looks for the previous row (after sorting the initial input), checks that it's the same property ID(or name, in your case) and if the rent_paid is greater than the previous months rent_paid. If so, it sents rent_increased to 1, otherwise it leaves it at 0. It's important to check for the property ID/names being the same too, otherwise you'll get edge effects when the property changes.
If you need to restore the original order, a counter before any of this stuff is a good idea. Let me know if I didn't get any aspect of your original question / input data correct, because there's more fun to be had with this stuff (VariableSetter / VariableRetriever especially!) : )
I couldn't upload the data in the same post, so... here's the data my example uses!
Did this help you find an answer to your question?
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
Hi Joe! I attached a workspace that uses attribute creator with adjacent features to solve how I interpreted your question. It looks for the previous row (after sorting the initial input), checks that it's the same property ID(or name, in your case) and if the rent_paid is greater than the previous months rent_paid. If so, it sents rent_increased to 1, otherwise it leaves it at 0. It's important to check for the property ID/names being the same too, otherwise you'll get edge effects when the property changes.
If you need to restore the original order, a counter before any of this stuff is a good idea. Let me know if I didn't get any aspect of your original question / input data correct, because there's more fun to be had with this stuff (VariableSetter / VariableRetriever especially!) : )
Hi Joe! I attached a workspace that uses attribute creator with adjacent features to solve how I interpreted your question. It looks for the previous row (after sorting the initial input), checks that it's the same property ID(or name, in your case) and if the rent_paid is greater than the previous months rent_paid. If so, it sents rent_increased to 1, otherwise it leaves it at 0. It's important to check for the property ID/names being the same too, otherwise you'll get edge effects when the property changes.
If you need to restore the original order, a counter before any of this stuff is a good idea. Let me know if I didn't get any aspect of your original question / input data correct, because there's more fun to be had with this stuff (VariableSetter / VariableRetriever especially!) : )
I couldn't upload the data in the same post, so... here's the data my example uses!
I couldn't upload the data in the same post, so... here's the data my example uses!
All good! Happy change-hunting :)
Hi FME Community,
I've been sent a spreadsheet with a series of rent entries. The name of the property, the dates and rent are the fields which are important.
For each entry, which is a single line per rent payment, there may be an increase in the amount. This can be after 1 line, or 20. Basically, I need to only keep the entries which show an increase in rent amounts.
Trying to find these entries and automate them seemed simple at first - but has stumped me.
If anyone has any ideas, I'll be very grateful.
Thank you
Page 1 / 1
Hi Joe! I attached a workspace that uses attribute creator with adjacent features to solve how I interpreted your question. It looks for the previous row (after sorting the initial input), checks that it's the same property ID(or name, in your case) and if the rent_paid is greater than the previous months rent_paid. If so, it sents rent_increased to 1, otherwise it leaves it at 0. It's important to check for the property ID/names being the same too, otherwise you'll get edge effects when the property changes.
If you need to restore the original order, a counter before any of this stuff is a good idea. Let me know if I didn't get any aspect of your original question / input data correct, because there's more fun to be had with this stuff (VariableSetter / VariableRetriever especially!) : )
fhildingwrote:
Hi Joe! I attached a workspace that uses attribute creator with adjacent features to solve how I interpreted your question. It looks for the previous row (after sorting the initial input), checks that it's the same property ID(or name, in your case) and if the rent_paid is greater than the previous months rent_paid. If so, it sents rent_increased to 1, otherwise it leaves it at 0. It's important to check for the property ID/names being the same too, otherwise you'll get edge effects when the property changes.
If you need to restore the original order, a counter before any of this stuff is a good idea. Let me know if I didn't get any aspect of your original question / input data correct, because there's more fun to be had with this stuff (VariableSetter / VariableRetriever especially!) : )
I couldn't upload the data in the same post, so... here's the data my example uses!
fhildingwrote:
I couldn't upload the data in the same post, so... here's the data my example uses!
Hi fhilding, thank you so much! I was going down the adjacent feature route and you....well you just hit the nail on the head.
You absolute star, thank you
fhildingwrote:
I couldn't upload the data in the same post, so... here's the data my example uses!
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.