Expand my Community achievements bar.

SOLVED

Calculated Metrics: How to create at a device type level

Avatar

Level 1

I am looking to create a calculated metric that sets a different value for Device type = Mobile and another one for Device type = Desktop. 

 

Example:

If homepage has page view & on mobile device, then set value for those hits to $2.
If homepage has page view & on desktop device, then set value for those hits to $1.

 

 

When I look at the report - at the mobile and desktop rows, the calculated metric is correct. 

 

However when I look at the overall homepage total, it doesn't give the correct total value by adding both the rows. I do not want to be having each of these desktop / mobile rows on every report i run. I just want to see the total for a page.

 

See below how I am thinking of giving different value to the homepage depending on device 

JustinKa4_2-1727827073659.png

JustinKa4_1-1727826917527.png

 

What I basically want is a list of sections or pages on our site - without having to use the breakdown of mobile / desktop.I just want an overall value. 

 

JustinKa4_3-1727827549482.png

 

When I look at the page itself with no device type, its taking the value of the homepage mobile views only as total. But the overall total is stranger, no idea how it got 120k.

JustinKa4_4-1727827673350.png

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor and Adobe Champion

Hi, I replicated using this:

 

Jennifer_Dungan_0-1727840374690.png

 

The problem is the IF statement looks at the data in aggregate... since at the total level (row or column), there are pages from both desktop and mobile, the IF logic basically meets both criteria, so the first clause will always be true... if mobile is first, ALL the total will be doubled, if desktop is first then it won't be doubled... 

 

 

You might want to try doing these as separate columns.. one for Desktop, one for Mobile, then a third column adding the two together:

 

Desktop:

Jennifer_Dungan_2-1727841046861.png

 

 

Mobile:

Jennifer_Dungan_3-1727841068476.png

 

 

Result:

(note the first column is just so you can see the original PVs, and that the new Total column is not it doubled)

 

Jennifer_Dungan_1-1727841026102.png

 

 

This way you can have the breakdown as your pages, without needing the row breakdowns by Device Type. I know it might not be ideal to have the columns split out, but I think this is the only option based on how it works....

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor and Adobe Champion

Hi, I replicated using this:

 

Jennifer_Dungan_0-1727840374690.png

 

The problem is the IF statement looks at the data in aggregate... since at the total level (row or column), there are pages from both desktop and mobile, the IF logic basically meets both criteria, so the first clause will always be true... if mobile is first, ALL the total will be doubled, if desktop is first then it won't be doubled... 

 

 

You might want to try doing these as separate columns.. one for Desktop, one for Mobile, then a third column adding the two together:

 

Desktop:

Jennifer_Dungan_2-1727841046861.png

 

 

Mobile:

Jennifer_Dungan_3-1727841068476.png

 

 

Result:

(note the first column is just so you can see the original PVs, and that the new Total column is not it doubled)

 

Jennifer_Dungan_1-1727841026102.png

 

 

This way you can have the breakdown as your pages, without needing the row breakdowns by Device Type. I know it might not be ideal to have the columns split out, but I think this is the only option based on how it works....

Avatar

Level 1

Thanks @Jennifer_Dungan 

 

Step one complete, when we look at the homepage and add another page "checkout", you can see total is working at both row and column. 

JustinKa4_0-1727842334270.png

 

However...when I look overall at another dimension, let's just pick anything - say "Day" dimension. The total is adding mobile and desktop - but the overall number in the same row of "Day" just at the top doesnt make sense. Why is it showing 93,783 when below in the segments you can see only homepage and checkout are the only ones, and my formula is just looking at those two pages. And its using HIT level segments.

 

JustinKa4_2-1727842572152.png

 

 

Avatar

Community Advisor and Adobe Champion

Great! Glad to help.

 

Just for anyone who stumbles upon this post, I believe the total is ALL Desktop for the entire panel range... so even though you were looking at Oct 1 as a breakdown, I think it was pulling in more data for the range.