Skip to main content
Question

problem of date with testfilter and attributcreator


nico42
Participant
Forum|alt.badge.img+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

nielsgerrits
VIP
Forum|alt.badge.img+55

I think you are looking for the AttributeRangeMapper.


becchr
Influencer
Forum|alt.badge.img+26
  • Influencer
  • April 3, 2024

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...


nico42
Participant
Forum|alt.badge.img+1
  • Author
  • Participant
  • April 5, 2024

tha,ks a lot for your returns


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings