Calculated Metrics IF THEN ELSE Statements

Avatar

Avatar
Validate 1
Level 1
laurab73463013
Level 1

Likes

0 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
laurab73463013
Level 1

Likes

0 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
laurab73463013
Level 1

15-07-2019

Hi, i am trying to use if then else statements in a calculated metric to give me a column with all relevant numbers. However it will only generate the first 2 correctly then seems to stop, i have tried stripping right back but i cant seem to get some to work at all.

I am simply using a calculated metric to say If metric = A then value of X, else If metric = B, then value of Y, if metric = C then value = Z ELSE value 0

Any help please would be great! Thank you

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 1
Level 1
rachell89752887
Level 1

Like

1 like

Total Posts

3 posts

Correct reply

1 solution
Top badges earned
Boost 1
Affirm 1
View profile

Avatar
Boost 1
Level 1
rachell89752887
Level 1

Like

1 like

Total Posts

3 posts

Correct reply

1 solution
Top badges earned
Boost 1
Affirm 1
View profile
rachell89752887
Level 1

11-09-2019

Hi,

I had the same issue. On an aggregated level, Adobe will read the calculated metric, and the first condition that is true will apply to all of the data, rather than it consider every hit and then aggregate up from there.


There is no workaround unless you break the data down using the dimension in your calculated metric. I have raised this with Adobe and their suggestion was to raise this to the forum.

Hope this helps!
Rachel

Answers (5)

Answers (5)

Avatar

Avatar
Validate 1
Level 1
laurab73463013
Level 1

Likes

0 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
laurab73463013
Level 1

Likes

0 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
laurab73463013
Level 1

12-09-2019

Hi Rachel,

Yes it does, i am glad to know it is not just me thank you for your reply,

Laura

Avatar

Avatar
Validate 1
Level 1
laurab73463013
Level 1

Likes

0 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
laurab73463013
Level 1

Likes

0 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
laurab73463013
Level 1

29-07-2019

thank you i have added my example below

Avatar

Avatar
Validate 1
Level 1
laurab73463013
Level 1

Likes

0 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
laurab73463013
Level 1

Likes

0 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
laurab73463013
Level 1

29-07-2019

Hi Please see an example below: i can not get each section to work only the first 2 for scheme 2 and 3, thank you

1801997_pastedImage_1.png

Avatar

Avatar
Establish
Level 5
ashokkumarm
Level 5

Likes

87 likes

Total Posts

56 posts

Correct reply

12 solutions
Top badges earned
Establish
Contributor
Shape 1
Give Back 10
Give Back 5
View profile

Avatar
Establish
Level 5
ashokkumarm
Level 5

Likes

87 likes

Total Posts

56 posts

Correct reply

12 solutions
Top badges earned
Establish
Contributor
Shape 1
Give Back 10
Give Back 5
View profile
ashokkumarm
Level 5

17-07-2019

Hi,

Could you provide the screenshot of calculated metric which you created.

Regards

Ashok

Avatar

Avatar
Affirm 1
Level 2
madhurc30892467
Level 2

Likes

15 likes

Total Posts

35 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Validate 1
Shape 1
Boost 5
Boost 3
View profile

Avatar
Affirm 1
Level 2
madhurc30892467
Level 2

Likes

15 likes

Total Posts

35 posts

Correct reply

1 solution
Top badges earned
Affirm 1
Validate 1
Shape 1
Boost 5
Boost 3
View profile
madhurc30892467
Level 2

16-07-2019

Hi Laurab,

I've tried creating a calculated metric using 'if' statement (see the screengrabs) & in this case I've taken referring domains as a dimension with visit metrics & it seems to be working fine. You can use the similar logic & see if it's working for you.

1792954_pastedImage_1.png

1792961_pastedImage_2.png

Thanks

M