Question

problem of date with testfilter and attributcreator

  • 3 April 2024
  • 3 replies
  • 46 views

Badge +1

Hello everybody.
I'm stuck I think over a trifle.
I have a dataset with dates like "1970".
I want to create a column allowing me to have date classes in it (for example [1970-1980[ ).
It seems to me that I need to go through a testfilter and a creatorattribute but what I do inside doesn't work.
Could someone give me a hand on the operation so that I understand how it works?
Thanking you very much in advance


3 replies

Userlevel 6
Badge +32

I think you are looking for the AttributeRangeMapper.

Userlevel 3
Badge +18

if your aim is to get something like this:

you could do it in one step instead of using testfilters and attributecreators with several conditions, which is harder to setup and maintain in my opinion.

To get the ‘dateclass’ column based on the column ‘_year’, I used this syntax in the text editor of an attributecreator:

@Evaluate(@floor(@Value(_year)/10,0)*10)-@Evaluate(@floor(@Value(_year)/10,0)*10+10)

but there are many other ways to achieve this...

Badge +1

tha,ks a lot for your returns

Reply