Skip to main content
Solved

Trying to use AttributeValueMapper to set one column's value based on the value of another column but it is not working. I can use it to map single values but I need to do it with ranges of values.


michael_m
Participant
Forum|alt.badge.img+1

I am able to use AttributeValueMapper to translate single values (ie if col1 == 1 then col2 = 'A') but I need to get it to map ranges of values, something like

if (col1 > 0 AND col1 <= 50) then col2 = 'A'

 

I keep getting 'Invalid Test Expression' errors so it sounds like I'm not writing the conditional tests correctly but I cannot see where I'm going wrong. Here's an example:

image 

Can anybody help me fix this, or point me at another way of setting a value in one column based on more than one possible value in another column?

 

Thanks,

 

Mike

Best answer by hkingsbury

I probably wouldn't do it in a AttributeValueMapper, id user either an AttributeCreator or AttributeManager. That above range should be fine, but you could also use the following logic

image

View original
Did this help you find an answer to your question?

2 replies

hkingsbury
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • Best Answer
  • June 20, 2023

I probably wouldn't do it in a AttributeValueMapper, id user either an AttributeCreator or AttributeManager. That above range should be fine, but you could also use the following logic

image


michael_m
Participant
Forum|alt.badge.img+1
  • Author
  • Participant
  • June 21, 2023

Thanks, hkingsbury. I did it in an AttributeManager and it's working well.


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