Match criteria for range of numbers in Classification Rule Builder

Avatar

Avatar
Level 1
dev27
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
dev27
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile
dev27
Level 1

09-12-2020

Hi,

 

I just want to ask how to create a classification for an eVar that takes the currency amount and buckets them into desired groups. For example, $0-$10, $10-$20, $20-$50, etc.

I am having trouble in entering match criteria for each bucket. Could someone please help me with this? Thank you in advance!

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Publish 1
MVP
yuhuisg
MVP

Likes

196 likes

Total Posts

603 posts

Correct reply

119 solutions
Top badges earned
Publish 1
Affirm 100
Springboard
Bedrock
Validate 1
View profile

Avatar
Publish 1
MVP
yuhuisg
MVP

Likes

196 likes

Total Posts

603 posts

Correct reply

119 solutions
Top badges earned
Publish 1
Affirm 100
Springboard
Bedrock
Validate 1
View profile
yuhuisg
MVP

10-12-2020

First off, I assume that the currency amount is already in an eVar, not in a success event.

Also, assuming that your eVar's values are stored as Text, then you can use regular expressions in Classification Rule Builder to build your buckets.

So, assuming that your eVar's values are whole numbers like this:

$0

$1

$5

$9

$13

$25

$23490234804243982904

Then the bucket for "$0-$10" would use regular expression ^\$([0-9]|10)$, i.e. match all values that are from $0 to $10, inclusive of those two numbers.

And the bucket for $11 (not $10, because $10 would have been classified in the above "$0-10" bucket) to $20 would use regular expression ^\$(1[1-9]|20)$

And so on.