Skip to main content

 

This is the source table. The verblijfsbagid is a unique number of a building. Where the colum leegstand = J, i want a value in the colum leegstaand_maanden. The first empty row is 1 then 2 then 3 etc. I used diffrent transformers, like neigborfinder but it didnt work.

Here under is the output that i want to see (red numbers):

 

 

One way to do this is to use an AttributeCreator where under Advanced Adjacent Feature Attribues is enabled. This way you are able to fill a row based on a value in a previous row.

Then use Conditional Value. How I configure this is to create a mockup with formulas in Excel, and then tranplant the logic from excel to the conditional value.


Hi ​@kevinkies ,

A possible way is, separate the data flow into two streams for LEEGSTAND = J or not with Tester and add sequential number attribute starting with 1 to the features passed the test with Counter (Count: LEEGSTAND_MAANDEN).

Alternatively, you can update LEEGSTAND_MAANDEN with a conditional value setting in AttributeManager, using @Count function like this.

 


Thanks ​@takashi it works fine if there in order with no leegstand=N in between. U see the leegstand J or N is not always in order after each other:

 

here u see row 72-73-74 with yes and de conditional value works fine. Further in the table J will come again, but i need that he counts again from 1. Like here below:

 

it looks difficult the make that possible


In that case, as ​@nielsgerrits  mentioned, a combination of Enable Adjacent Feature Attributes option and conditional value setting works for you.