filter classification rule

Avatar

Avatar

Hyeran

Avatar

Hyeran

Hyeran

21-02-2021

hi there, 

is there anyone who knows how to not to correct 1 depth data if there is 2 or 3 depth data? 

 

for example, as you can see the picture, 

 

gnb: test_company_all has 2 values : "all" for 3depth and "tes" for 1depth (donna why just "tes" came out :(, anyway) 

 

but i would like to get just "all" for 3depth, since "tes" is not the data that i want to collect. 

 

1depth should collect just 1 depth sentence like "gnd:test3" which doesn't have _ in value. 

 

let me know if you guys know the way. thanx 

this is the regular expression that i used for this classification 

 

1depth: ^(gnb: )(.[a-zA-Z0-9 ]+)[^_$%^&]
3depth: ^(gnb: )(.*)(_)(.*)(_)(.*)

20210222_154103.png

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar

yuhuisg

Avatar

yuhuisg

yuhuisg

23-02-2021

Regarding your "tes" value in 1depth, it's because of your RegEx. I believe 1depth is getting the content of the $2 group.

So, with some colouring to help to explain:

Your regular expression for 1depth: ^(gnb: )(.[a-zA-Z0-9 ]+)[^_$%^&]

Your value and its matches: gnb: test_company_all

The red expression is preventing the last character from being included in your green expression. So instead of "test", you're getting "tes", i.e. without the last "t".

Likewise with "gnb: test2_company_all" and "gnb: test3"

Avatar

Avatar

PratheepArunRaj

Moderator

Avatar

PratheepArunRaj

Moderator

PratheepArunRaj
Moderator

22-02-2021

Hello Hyeran,

It can be achieved by Stacking Rules in Classification Builder.

Check out my blog (https://terrynwinter.com/adobe-analytics-stacking-rules-in-classification-rule-builder/) and the same will help you on what you are trying to achieve.

Thank You, Arun.